fixed bug in spyserevr source

pull/47/head
Ryzerth 2020-12-22 20:44:49 +01:00
rodzic 720df5ce89
commit eec2f7c4a0
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -74,7 +74,7 @@ bool SpyServerClient::connectToSpyserver(char* host, int port) {
unsigned long mode = 1;
ioctlsocket(sock, FIONBIO, &mode);
#else
fcntl(sockfd, F_SETFL, fcntl(sockfd, F_GETFL, 0) | O_NONBLOCK)
fcntl(sockfd, F_SETFL, fcntl(sockfd, F_GETFL, 0) | O_NONBLOCK);
#endif
connected = true;
@ -117,7 +117,7 @@ int SpyServerClient::receive(char* buf, int count) {
#ifdef _WIN32
return checkError(recv(sock, (char*)buf, count, 0), count);
#else
return checkError(read(sockfd, buf, count));
return checkError(read(sockfd, buf, count), count);
#endif
}