From 3810db7ac853812cbfbd6e1db6764167cc283800 Mon Sep 17 00:00:00 2001 From: "jazz (gitea)" Date: Wed, 18 Mar 2026 16:16:14 -0500 Subject: [PATCH] spacing --- client.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client.cc b/client.cc index cda0188..c6cb172 100644 --- a/client.cc +++ b/client.cc @@ -49,9 +49,11 @@ pollForSever(void *args) }*/ // cout << "Server: " << msg << endl; // printf("Server: %s\n"); + writeToFile(logFileName, msg); if (linesInFile(logFileName) > LOG_LENGTH) linePos++; + displayFile(logFileName, linePos, LOG_LENGTH); } } @@ -77,8 +79,10 @@ setupClient() // try to connect... int status = connect(clientSocketDescriptor, (sockaddr *)&sendSockAddr, sizeof(sendSockAddr)); + if (status < 0) writeToFile(logFileName, "Error connecting to socket!"); + writeToFile(logFileName, "Connected to the server!"); int bytesRead, bytesWritten = 0; struct timeval start1, end1;