listen on 0.0.0.0 by default

This commit is contained in:
jazz
2026-04-15 10:38:52 -05:00
parent 2e70901ef8
commit e3cf81ab3f
2 changed files with 6 additions and 2 deletions

View File

@@ -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));

View File

@@ -24,7 +24,7 @@
using namespace std;
const int PORT_NUM = 8888;
string IP_ADDRESS = "127.0.0.1";
string IP_ADDRESS = "0.0.0.0";
const int DEFAULT_CUR_X = 2; // the x position of the preferred default cursor
// position for message entry
const int DEFAULT_CUR_Y = 12; // the x position of the preferred default cursor