So I have a known working version of this code on Windows and MacOSX:
int CSocket::setsync(int mode)
{
if(sockid < 0)return -1;
u_long i = mode;
return ioctlsocket(sockid, FIONBIO, &i);
}
I just want to know if the following Linux version is functionally equivalent:
int CSocket::setsync(int mode)
{
if(sockid < 0)return -1;
u_long i = mode;
return ioctl(sockid, FIONBIO, &i);
}
Just an FYI, i #included sys/ioctl.h