If it helps at all, the error 10045 you get from WSAGetLastError
is described as follows:
EDIT
On my Windows system, I checked the value of FIONBIO
in the debugger, and it should be 0x8004667E
.
It's defined like this in both winsock.h
and winsock2.h
in the Windows 8 SDK:
#define _IOW(x,y,t) (IOC_IN|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y))
#define FIONBIO _IOW('f', 126, u_long) /* set/clear non-blocking i/o */
If you set an unsigned int
equal to FIONBIO
, then 0x8004667E
is what you get.