Re: ORBit2 on Win32
- From: Dan Kegel <dank kegel com>
- To: Karl Waclawek <karl waclawek net>
- Cc: Michael Meeks <michael ximian com>, orbit <orbit-list gnome org>,"Karl Waclawek (IStop)" <kwaclaw istop com>
- Subject: Re: ORBit2 on Win32
- Date: Wed, 18 Sep 2002 09:06:06 -0700
Karl Waclawek wrote:
> > > AFAIK, the windows sockest can be used in a truly asynchronous way,
> > > i.e. the OS call you back, no polling needed.
> >
> > Interesting; in a separate thread as it were ?
>
> I think so.
> You pass a window handle to the WSAAsyncSelect call, and this window will
> receive socket events as messages to be processed by its message loop.
> AFAIK, this window does not have to belong to the same thread.
WSAAsyncSelect is just too gui-specific -- you can't use
it in services that don't have access to the display.
> Then there is yet another way of doing it: Overlapped I/O.
> Here is what the docs have to say, to give you an idea:
> (I am not expert at it, just in case you have that illusion)
That's better. But Microsoft has added a newer interface that makes
overlapped I/O easier to use and faster, too; it's called "I/O
completion
ports", and it's the preferred way to do scalable networking in Windows
today. (You have to fall back to something else in win9x, but that's
ok.)
See
http://www.kegel.com/c10k.html#aio
"Programming Server-Side Applications for Microsoft Windows 2000", by
Jeffrey Richter
"Network Programming for Microsoft Windows,2nd ed" by Jones and Ohlund
That last book has the best info, I think.
- Dan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]