🚸 Make it possible to exit the client
This commit is contained in:
parent
45e779c56f
commit
cfb7478ab9
1 changed files with 3 additions and 1 deletions
|
@ -2,6 +2,7 @@
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
|
#include <ostream>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
@ -39,7 +40,8 @@ int main() {
|
||||||
cout << "Type message to server: ";
|
cout << "Type message to server: ";
|
||||||
cin >> message.content;
|
cin >> message.content;
|
||||||
|
|
||||||
if (strcmp(message.content, "exit") == 0) {
|
if (message.content == "exit") {
|
||||||
|
cout << "BYE!" << endl;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue