Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifdef _WIn32
- int lengthTemp = recv(socketId, bufferTmp, 1, 0), error = WSAGetLastError();
- if(lengthTemp == 0 && error == 0)
- sendStr(" ");
- if(error == 10053)
- {
- log("Server closed");
- connected = 0;
- break;
- }
- #elifndef
- if(recv(socketId, NULL, 1, MSG_PEEK | MSG_DONTWAIT) == 0)
- {
- cout << "Server closed" << endl;
- connected = 0;
- break;
- }
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement