diff options
Diffstat (limited to 'otherlibs/win32unix')
-rw-r--r-- | otherlibs/win32unix/accept.c | 8 | ||||
-rw-r--r-- | otherlibs/win32unix/socket.c | 6 | ||||
-rw-r--r-- | otherlibs/win32unix/unix.ml | 14 |
3 files changed, 10 insertions, 18 deletions
diff --git a/otherlibs/win32unix/accept.c b/otherlibs/win32unix/accept.c index 90a0860df..1c45ade0c 100644 --- a/otherlibs/win32unix/accept.c +++ b/otherlibs/win32unix/accept.c @@ -17,8 +17,8 @@ #include "unixsupport.h" #include "socketaddr.h" -value unix_accept(sock, synchronous) /* ML */ - value sock, synchronous; +value unix_accept(sock) /* ML */ + value sock; { SOCKET sconn = (SOCKET) Handle_val(sock); SOCKET snew; @@ -29,8 +29,8 @@ value unix_accept(sock, synchronous) /* ML */ retcode = getsockopt(INVALID_SOCKET, SOL_SOCKET, SO_OPENTYPE, (char *) &oldvalue, &oldvaluelen); if (retcode == 0) { - /* Set sockets to synchronous or asnychronous mode, as requested */ - newvalue = Bool_val(synchronous) ? SO_SYNCHRONOUS_NONALERT : 0; + /* Set sockets to synchronous mode */ + newvalue = SO_SYNCHRONOUS_NONALERT; setsockopt(INVALID_SOCKET, SOL_SOCKET, SO_OPENTYPE, (char *) &newvalue, sizeof(newvalue)); } diff --git a/otherlibs/win32unix/socket.c b/otherlibs/win32unix/socket.c index 5e8d218ec..a69867cfd 100644 --- a/otherlibs/win32unix/socket.c +++ b/otherlibs/win32unix/socket.c @@ -24,7 +24,7 @@ int socket_type_table[] = { SOCK_STREAM, SOCK_DGRAM, SOCK_RAW, SOCK_SEQPACKET }; -value unix_socket(domain, type, proto, synchronous) /* ML */ +value unix_socket(domain, type, proto) /* ML */ value domain, type, proto; { SOCKET s; @@ -34,8 +34,8 @@ value unix_socket(domain, type, proto, synchronous) /* ML */ retcode = getsockopt(INVALID_SOCKET, SOL_SOCKET, SO_OPENTYPE, (char *) &oldvalue, &oldvaluelen); if (retcode == 0) { - /* Set sockets to synchronous or asnychronous mode, as requested */ - newvalue = Bool_val(synchronous) ? SO_SYNCHRONOUS_NONALERT : 0; + /* Set sockets to synchronous mode */ + newvalue = SO_SYNCHRONOUS_NONALERT; setsockopt(INVALID_SOCKET, SOL_SOCKET, SO_OPENTYPE, (char *) &newvalue, sizeof(newvalue)); } diff --git a/otherlibs/win32unix/unix.ml b/otherlibs/win32unix/unix.ml index eb16b8a8c..17eecb0d8 100644 --- a/otherlibs/win32unix/unix.ml +++ b/otherlibs/win32unix/unix.ml @@ -476,18 +476,10 @@ type socket_option = | SO_DONTROUTE | SO_OOBINLINE -external socket_internal : - socket_domain -> socket_type -> int -> bool -> file_descr - = "unix_socket" - -let socket dom typ proto = socket_internal dom typ proto true -let async_socket dom typ proto = socket_internal dom typ proto false +external socket : socket_domain -> socket_type -> int -> file_descr + = "unix_socket" let socketpair dom ty proto = invalid_arg "Unix.socketpair not implemented" - -external accept_internal : - file_descr -> bool -> file_descr * sockaddr = "unix_accept" -let accept s = accept_internal s true -let async_accept s = accept_internal s false +external accept : file_descr -> file_descr * sockaddr = "unix_accept" external bind : file_descr -> sockaddr -> unit = "unix_bind" external connect : file_descr -> sockaddr -> unit = "unix_connect" external listen : file_descr -> int -> unit = "unix_listen" |