Archived
1
0
Fork 0

🎨 Impore formatting of output

This commit is contained in:
Simon V. Lejel 2024-02-10 14:26:45 +01:00
parent 2a5a735fde
commit 45e779c56f
Signed by: sl
GPG key ID: 6544A0430A2CFFAD

View file

@ -38,15 +38,16 @@ int main() {
Message message;
cout << "Type message to server: ";
cin >> message.content;
cout << endl;
message.username = "Client 1";
if (strcmp(message.content, "exit") == 0) {
break;
}
cout << "Sending message to server as user: " << message.username << endl;
send(clientSocket, message.content, strlen(message.content), 0);
cout << endl;
message.username = "Client 1";
send(clientSocket, message.toString().data(),
strlen(message.toString().data()), 0);
}
close(clientSocket);