caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Christoph Bauer <christoph.bauer@lms-gmbh.de>
To: Robert Roessler <roessler@rftp.com>, Caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] Re: Select on channels (again)
Date: Wed, 23 Aug 2006 10:29:13 +0200	[thread overview]
Message-ID: <26EB47FDD566A7469FC862DAF373792F018CF5F4@kaiserslautern1.lmsintl.com> (raw)


> > ...
> > I did this, but on windows with two programs communicating 
> over a pipe 
> > this isn't enough. select on windows and on a pipe doesn't work. 
> > Therefore I wrote a stub for PeekNamedPipe():
> 
> "Select on windows" certainly does work... and why not use a 
> socket pair, just as one might on a *nix system?  That way, 
> it will work on both.

Select doesn't work on window pipes. In retrospect sockects
would be the better choice. I stumbled in a strange dead lock
with theses pipes, because under windows the pipe buffer
is set to 1024 bytes (otherlibs/win32unix/pipe.c) and will then
block til the reader reads the contents. IMO this
value (SIZEBUF) should be zero to let the system choose the best
buffer size. [1] 


> And the fact that socketpair has been left out of the Windows 
> version of the Unix module is not an impediment - it is easy 
> to write a useful implementation in OCaml (I can supply one 
> if needed).

Please supply one.

Christoph Bauer

[1]
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ipc/base/cr
eatepipe.asp


             reply	other threads:[~2006-08-23  8:29 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-23  8:29 Christoph Bauer [this message]
2006-08-23 17:35 ` Robert Roessler
2006-08-24  8:18 ` Robert Roessler
  -- strict thread matches above, loose matches on Subject: below --
2006-08-15  0:46 Nathaniel Gray
2006-08-21 22:47 ` Nathaniel Gray
2006-08-22  0:42   ` [Caml-list] " Jonathan Roewen
2006-08-22  6:27     ` Nathaniel Gray
2006-08-22  6:41       ` Jonathan Roewen
2006-08-22  8:15         ` skaller
2006-08-22 21:15           ` Mike Lin
2006-08-23  5:12         ` Nathaniel Gray
2006-08-22  8:10       ` Olivier Andrieu
2006-08-23  5:27         ` Nathaniel Gray
2006-08-22  8:21       ` Jacques Garrigue
2006-08-23  5:16         ` Nathaniel Gray
2006-08-23  6:35           ` skaller
2006-08-23 19:31             ` Nathaniel Gray
2006-08-24  5:37               ` skaller
2006-08-24 19:06                 ` Nathaniel Gray
2006-08-25  1:55                   ` skaller
2006-08-25 22:19                     ` Nathaniel Gray

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=26EB47FDD566A7469FC862DAF373792F018CF5F4@kaiserslautern1.lmsintl.com \
    --to=christoph.bauer@lms-gmbh.de \
    --cc=caml-list@inria.fr \
    --cc=roessler@rftp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).