caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Unix.connect for non-blocking sockets on Windows
@ 2012-09-14 13:53 Romain Bardou
  2012-09-14 14:27 ` Jérémie Dimino
  0 siblings, 1 reply; 7+ messages in thread
From: Romain Bardou @ 2012-09-14 13:53 UTC (permalink / raw)
  To: caml-list

Hello,

It seems, from the manual[1] that sockets of the Unix module are fully 
implemented on Windows. It also seems, from other googling, that 
non-blocking sockets are also implemented.

[1] http://caml.inria.fr/pub/docs/manual-ocaml/manual036.html

However, when I run the Unix.connect command on Windows, I get:

   Unix_error(EWOULDBLOCK, "connect", "")

I'm using OCaml 3.12.1 on Windows using the (older) installer from 
Jonathan, which uses mingw if I'm not mistaken. The code I use is more 
or less equivalent to:

   open Unix
   let address = "xxx.xxx.xxx.xxx" in (* some IP for IPv4 *)
   let port = 9543 in
   let fd = socket PF_INET SOCK_STREAM 0 in
   set_nonblock fd;
   connect fd (ADDR_INET (Unix.inet_addr_of_string address, port))

Is this a known issue?

Thanks,

-- 
Romain Bardou

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-10-10 14:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-14 13:53 [Caml-list] Unix.connect for non-blocking sockets on Windows Romain Bardou
2012-09-14 14:27 ` Jérémie Dimino
2012-09-14 15:21   ` Jerome Vouillon
2012-09-14 15:26     ` Romain Bardou
2012-09-14 15:33     ` Jérémie Dimino
2012-09-14 15:46       ` Romain Bardou
2012-10-10 14:14       ` Jerome Vouillon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).