listen on 0.0.0.0 by default
This commit is contained in:
@@ -24,7 +24,7 @@ closeClient()
|
||||
|
||||
gettimeofday(&end1, NULL);
|
||||
close(clientSocketDescriptor);
|
||||
|
||||
|
||||
puts("********Session********");
|
||||
printf("Bytes written: %i\n", bytesWritten);
|
||||
printf("Bytes read: %i\n", bytesRead);
|
||||
@@ -78,6 +78,10 @@ setupClient()
|
||||
// create a message buffer
|
||||
char msg[1024];
|
||||
// setup a socket and connection tools
|
||||
|
||||
if (IP_ADDRESS == "0.0.0.0")
|
||||
IP_ADDRESS = "127.0.0.1";
|
||||
|
||||
struct hostent *host = gethostbyname(IP_ADDRESS.c_str());
|
||||
sockaddr_in sendSockAddr;
|
||||
bzero((char *)&sendSockAddr, sizeof(sendSockAddr));
|
||||
|
||||
Reference in New Issue
Block a user