Cleanup ioctl

This commit is contained in:
MarcEricMartel 2023-10-30 11:07:26 -04:00
parent 6ce7e62e05
commit a95dd02896

View File

@ -57,12 +57,8 @@ int Connector::Connect(const char* srv_addr, std::string name) {
return 2; return 2;
} }
#ifdef _WIN32
u_long flag = 1; u_long flag = 1;
if (ioctl(m_sock_tcp, SOCK_NONBLOCK, &flag) < 0) { if (ioctl(m_sock_tcp, SOCK_NONBLOCK, &flag) < 0) {
#else
if (ioctl(m_sock_tcp, SOCK_NONBLOCK, NULL) < 0) {
#endif
std::cout << "Impossible de mettre le socket en mode non-bloquant." << std::endl; std::cout << "Impossible de mettre le socket en mode non-bloquant." << std::endl;
return 3; return 3;
} }