forked from scott/threaded_network_chat
spelling
This commit is contained in:
@@ -43,6 +43,7 @@ pollForClient()
|
||||
// receive a message from the client (listen)
|
||||
memset(&msg, 0, sizeof(msg)); // clear the buffer
|
||||
bytesRead += recv(clientSocketDescriptor, (char *)&msg, sizeof(msg), 0);
|
||||
|
||||
writeToFile(logFileName,
|
||||
msg); // write the client's message to file
|
||||
if (linesInFile(logFileName) > LOG_LENGTH)
|
||||
@@ -98,7 +99,7 @@ setupServer(int port)
|
||||
aaa->newSockAddrSize = newSockAddrSize;
|
||||
int rc = pthread_create(&client_wait_thread, nullptr, waitForClient, aaa);
|
||||
pthread_detach(client_wait_thread);
|
||||
writeToFile(logFileName, "Server started sucessfully");
|
||||
writeToFile(logFileName, "Server started successfully");
|
||||
gettimeofday(&start1, NULL);
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user