caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Windows problem with Unix.open_connection
@ 2012-02-24 15:17 David Allsopp
  0 siblings, 0 replies; only message in thread
From: David Allsopp @ 2012-02-24 15:17 UTC (permalink / raw)
  To: OCaml List

I'm in the process of eliminating any customisations I might have in place,
but do any other Windows users get the following unexpected result with
Unix.open_connection running MinGW-w64 OCaml 3.12.1?

# let (i, o) = Unix.open_connection (Unix.ADDR_INET
(Unix.inet_addr_of_string "173.194.67.104", 80));;
val i : in_channel = <abstr>
val o : out_channel = <abstr>
# output_string o "GET HTTP/1.0\r\n\r\n";;
- : unit = ()
# flush o;;
Exception: Sys_error "Invalid argument".
# input_line i;;
Exception: Sys_error "Invalid argument".
# close_out o;;

WireShark confirms that a connection is correctly made to Google on port 80
by Unix.open_connection but something would appear to be seriously wrong
with the handle translations in Unix.open_connection.


David


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-02-24 15:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-24 15:17 [Caml-list] Windows problem with Unix.open_connection David Allsopp

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).