apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Mansion" <ja...@wgold.demon.co.uk>
Subject RE: [RFC] apr_pollcb api?
Date Mon, 20 Mar 2006 06:24:19 GMT
>- How could win32 fit into this type of API?  It would be
> awesomr if we could ditch select() on win32.

This sort of reactive design doesn't fit well in Win32.
Win32 is 'completion' based.  You need to have a callback
structure that handles partial or full completions.  cf the
selector and proactor stuff in ACE.

You can implement the completion-based stuff with select etc,
but not the other way around.  Personally, I find the
completion view much more natural - I hardly ever generate
content because I have buffer space to write to, and buffers
are cheap enough to come by now to have some space allocated
to each socket, even if its 'only' a small buffer that will
handle a fixed message header, or is likely to tell me what
sort of HTTP request I'm going to deal with.

View raw message