socket in the windows port

Friedman Roy (roy@cs.technion.ac.il)
Fri, 11 Sep 1998 00:23:29 +0200 (IST)

Date: Fri, 11 Sep 1998 00:23:29 +0200 (IST)
From: Friedman Roy <roy@cs.technion.ac.il>
To: caml-list@inria.fr
Subject: socket in the windows port

Hi everyone,

In looking at the code of socket.c for windows, I noticed the following
code:

/* Set sockets to synchronous mode */
optionValue = SO_SYNCHRONOUS_NONALERT;
setsockopt(INVALID_SOCKET, SOL_SOCKET, SO_OPENTYPE,
(char *)&optionValue, sizeof(optionValue));

Is there a reason it is there? One negative aspect of this is that when
one tries to set a socket to a non blocking mode and then connect to it,
then NT returns a WSAEINVALID error code, meaning that the operation is
not allowed on that socket.

Thanks,

Roy