Skip to content

Commit 809aaec

Browse files
committed
changed default to ipv4
1 parent 13b8501 commit 809aaec

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

PNet/Source.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const timeval timeout = { 1, 0 };
99

1010
int serverthread()
1111
{
12-
TCPServer server(ConnectionType::IPV6);
12+
TCPServer server(ConnectionType::IPV4);
1313
auto result = server.StartListener();
1414
if (result == PRESULT::SUCCESS)
1515
{
@@ -30,8 +30,8 @@ int main()
3030
std::thread st(serverthread);
3131
Sleep(500);
3232

33-
TCPClient myConn(ConnectionType::IPV6); //Create IPV4 Client
34-
auto result = myConn.Connect(IPAddress("::1", ConnectionType::IPV6), 8888, timeout); //Connect ipv6 client to localhost 127.0.0.1 on port 8888 with a timeout up to "timeout"
33+
TCPClient myConn(ConnectionType::IPV4); //Create IPV4 Client
34+
auto result = myConn.Connect(IPAddress("127.0.0.1", ConnectionType::IPV4), 8888, timeout); //Connect ipv6 client to localhost 127.0.0.1 on port 8888 with a timeout up to "timeout"
3535
if (myConn.IsConnected())
3636
{
3737
std::cout << "Connected!" << std::endl;

0 commit comments

Comments
 (0)