forked from scott/threaded_network_chat
spacing
This commit is contained in:
@@ -49,9 +49,11 @@ pollForSever(void *args)
|
|||||||
}*/
|
}*/
|
||||||
// cout << "Server: " << msg << endl;
|
// cout << "Server: " << msg << endl;
|
||||||
// printf("Server: %s\n");
|
// printf("Server: %s\n");
|
||||||
|
|
||||||
writeToFile(logFileName, msg);
|
writeToFile(logFileName, msg);
|
||||||
if (linesInFile(logFileName) > LOG_LENGTH)
|
if (linesInFile(logFileName) > LOG_LENGTH)
|
||||||
linePos++;
|
linePos++;
|
||||||
|
|
||||||
displayFile(logFileName, linePos, LOG_LENGTH);
|
displayFile(logFileName, linePos, LOG_LENGTH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -77,8 +79,10 @@ setupClient()
|
|||||||
// try to connect...
|
// try to connect...
|
||||||
int status =
|
int status =
|
||||||
connect(clientSocketDescriptor, (sockaddr *)&sendSockAddr, sizeof(sendSockAddr));
|
connect(clientSocketDescriptor, (sockaddr *)&sendSockAddr, sizeof(sendSockAddr));
|
||||||
|
|
||||||
if (status < 0)
|
if (status < 0)
|
||||||
writeToFile(logFileName, "Error connecting to socket!");
|
writeToFile(logFileName, "Error connecting to socket!");
|
||||||
|
|
||||||
writeToFile(logFileName, "Connected to the server!");
|
writeToFile(logFileName, "Connected to the server!");
|
||||||
int bytesRead, bytesWritten = 0;
|
int bytesRead, bytesWritten = 0;
|
||||||
struct timeval start1, end1;
|
struct timeval start1, end1;
|
||||||
|
|||||||
Reference in New Issue
Block a user