07-28-04 11:19 PM
Wim Deprez wrote:
> Hi Group,
>
> for porting issues, I need to translate a fcntl(). In the original
> *nix-code the following is used:
>
> fcntl(sd, F_SETFL, O_NONBLOCK);
>
> to make sd a non blocking socket. Now I was wondering if
>
> // If iMode = 0, blocking is enabled;
> // If iMode != 0, non-blocking mode is enabled.
> int iMode = 1;
> ioctlsocket(sd, FIONBIO, (u_long FAR*) &iMode)
>
> contains the same behaviour for win32 systems.
You'd better ask in Winsock programming group, like
alt.winsock.programming.
However, it is easy to test: just open a connection
to a remote host and execute the following:
int r;
char buf;
r1 = read(fd, &buf, 1);
assert(r1 == -1 && errno == EAGAIN);
or something similar.
(make sure the remote host does not send anything.
www.com:80 will do).
--
Lev Walkin
vlm@lionet.info
[ Post a follow-up to this message ]
|