added 'Windows compatability mode' to the code.

This commit is contained in:
Charles Descamps 2025-02-05 18:52:41 -07:00
parent 0876124fc5
commit ba780689de

View file

@ -46,7 +46,7 @@ int main(int argc, char **argv)
message[receivedDataLen] = '\0'; message[receivedDataLen] = '\0';
printf("Message rec: %s", message); printf("Message rec: %s", message);
// if "time\r\n" is received, then send() back the linux epoch. // if "time\r\n" is received, then send() back the linux epoch.
if(strcmp(message, "time\n") == 0) if(strcmp(message, "time\n") == 0 || strcmp(message, "time\r\n") == 0)
{ {
// //
char reply[BUFFER_SIZE]; char reply[BUFFER_SIZE];