Re: Non-blocking input on windows, like select in Unix
From: Jonathan Fine (jfine_at_pytex.org)
Date: Wed, 02 Mar 2005 18:52:26 +0000
> Jonathan Fine a écrit :
>> Paul Rubin wrote:
>> As I recall, some posts to this list say that Windows provides
>> non-blocking i/o for sockets but not for files.
> No, Windows does provide non-blocking I/O for regular files, but it's a
> completely different mechanism than the one used by winsock. You'll have
> to use win32all and enter the Dark Side, that is Windows APIs.
> You don't want to do that if you're not already familiar with
> CreateProcess, CreatePipe, overlapped structures, WaitForSingleObject &
Thank you for this.
My application will, I think, become much more complicated if I cannot
use non-blocking input. (As already explained, it is not a problem
that can be solved by threads. Basically, I _need_ either to read
all available data, _or_ to read very carefully a byte at a time.)
Knowing that non-blocking input can be done under Windows, I would
like to use it. In the longer run, that will be easier than
rewriting my application. Or so it seems to me.
I did a google search, on the web, for
CreateProcess, CreatePipe, overlapped structures, WaitForSingleObject
This is the first page is produced
Seems to be the right sort of thing. But I don't have time to read it
I'm not really a Windows programmer. Don't know the system calls.
But I do want my application to run on Windows.
I'll get back to this in a couple of weeks. (Busy right now.)