[Caml-list] Re: Unix.send blocks

2010-06-16 Thread Sylvain Le Gall
On 16-06-2010, Paul Steckler wrote: > I've written a wee Web server in OCaml that's compiled using the ocamlopt > from the > Fedora MinGW distribution of ocaml. I'm running the server in Windows 7. > > Sometimes after receiving several requests, the Unix.send call that sends a > response > back

[Caml-list] Re: Unix.send blocks

2010-06-16 Thread Sylvain Le Gall
On 16-06-2010, Christoph Bauer wrote: > >> While it's easy to reproduce the error (a certain pattern of requests >> from the browser), I can't tell what particular conditions cause the >> blocking behavior. >> >> Any help appreciated. > > I guess you are using Unix.select. There is (was) a bug

[Caml-list] Re: Unix.send blocks

2010-06-16 Thread Sylvain Le Gall
On 16-06-2010, Török Edwin wrote: > On 06/16/2010 10:32 AM, Paul Steckler wrote: > > You could set the socket to nonblocking mode (and check with 'select' > whether you can send), but according to the manual that doesn't work on > the native windows port of OCaml. > select works on Windows with l

[Caml-list] Re: Unix.send blocks

2010-06-16 Thread Paul Steckler
I wrote: > Sometimes after receiving several requests, the Unix.send call that sends a > response > back to a Web client just blocks. The send buffer is pretty large (64k), and > the data > to be sent is always much less than that. I've found a solution. When receiving data from the browser,

RE: [Caml-list] Re: Unix.send blocks

2010-06-16 Thread Christoph Bauer
> While it's easy to reproduce the error (a certain pattern of requests > from the browser), I can't tell what particular conditions cause the blocking > behavior. > > Any help appreciated. I guess you are using Unix.select. There is (was) a bug in the windows select implementation. It had pro