[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Monotone-devel] Help: select() like functionality on pipes on Win32 - h
From: |
Christof Petig |
Subject: |
[Monotone-devel] Help: select() like functionality on pipes on Win32 - how? |
Date: |
Mon, 18 Jul 2005 09:26:21 +0200 |
User-agent: |
Mozilla Thunderbird 1.0.2 (X11/20050404) |
Good morning,
In an attempt to get the functionality written by me* into the main
branch I implemented a common infrastructure: Portable bidirectional
pipes to a program (like a bidirectional popen()). So far it had been
easy :-S
But the problem lies somewhere else: I have this infrastructure
(netxx_pipe.* on the n.v.m.cvssync.win32 branch**) ready and tested but
... to make netsync over pipes work I need a Netxx::Probe which can cope
with pipes.
On Unix this is a piece of cake: select works against everything. On
Win32 select only works against sockets, not pipes or files. So my
question is:
==> How can I wait for data to get available on a pipe on Win32? <==
I know about SetCommTimeout() (to implement non blocking IO) and
ReadFileEx() (so called overlapping IO) but both methods need an actual
read. There seems to be no way to implement a select like function (on a
single pipe!) on windows.
My current (desperate) plan is to use ReadFileEx to implement
overlapping IO and store the data in the Netxx::Stream for later reading
but if anybody knows an easier way please tell me
Christof
*) netsync over pipes (local serverless sync), netsync over ssh (remote
serverless sync), cvs pull and push
**) if you want to use this class you might need to fall back to
revision 5b84bca4ea28c6522af6e108f65b6f37dc0deeb3 since newer revisions
are work in progress.
signature.asc
Description: OpenPGP digital signature
- [Monotone-devel] Help: select() like functionality on pipes on Win32 - how?,
Christof Petig <=