Archived
1
0
Fork 0

🚸 Make it possible to exit the client

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

View file

@ -2,6 +2,7 @@
#include <cstring>
#include <iostream>
#include <netinet/in.h>
#include <ostream>
#include <sys/socket.h>
#include <unistd.h>
@ -39,7 +40,8 @@ int main() {
cout << "Type message to server: ";
cin >> message.content;
if (strcmp(message.content, "exit") == 0) {
if (message.content == "exit") {
cout << "BYE!" << endl;
break;
}