1
0

[Fix] server error message

This commit is contained in:
Tony Yang 2021-12-27 04:50:30 +08:00
parent c8c16d65c3
commit f0db4dec3b
Signed by: t510599
GPG Key ID: D88388851C28715D

View File

@ -96,13 +96,13 @@ int main(int argc, char const *argv[]) {
// bind
if (bind(sockfd, (struct sockaddr *) &server_info, sizeof(server_info)) == -1) {
cerr << "Cannot bind server." << endl;
cerr << "Cannot bind socker." << endl;
return BINDERR_RET;
}
// only one connection at the same time
if (listen(sockfd, 1) == -1) {
cerr << "Cannot listen socket." << endl;
cerr << "Cannot listen to socket." << endl;
return LISTENERR_RET;
}
cout << "Server up. Waiting connection..." << endl;