diff options
Diffstat (limited to 'src/test.cpp')
-rw-r--r-- | src/test.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/test.cpp b/src/test.cpp index c969c0951..dd2691947 100644 --- a/src/test.cpp +++ b/src/test.cpp @@ -1506,11 +1506,13 @@ struct TestSocket: public TestBase void Run() { const int port = 30003; + Address address(0,0,0,0, port); + Address address6((IPv6AddressBytes*) NULL, port); // IPv6 socket test { UDPSocket socket6(true); - socket6.Bind(port); + socket6.Bind(address6); const char sendbuffer[] = "hello world!"; IPv6AddressBytes bytes; @@ -1536,7 +1538,7 @@ struct TestSocket: public TestBase // IPv4 socket test { UDPSocket socket(false); - socket.Bind(port); + socket.Bind(address); const char sendbuffer[] = "hello world!"; socket.Send(Address(127,0,0,1,port), sendbuffer, sizeof(sendbuffer)); @@ -1656,7 +1658,8 @@ struct TestConnection: public TestBase infostream<<"** Creating server Connection"<<std::endl; con::Connection server(proto_id, 512, 5.0, false, &hand_server); - server.Serve(30001); + Address address(0,0,0,0, 30001); + server.Serve(address); infostream<<"** Creating client Connection"<<std::endl; con::Connection client(proto_id, 512, 5.0, false, &hand_client); |