SOCKET + recv() is not a general notifier mechanism.

WSAPoll is not available on XP, so that's out.

SOCKET does work with select(). As Andrew noted, it's not directly usable in 
WaitForMultipleObjects().

What do you expect that the caller will need (or want) to do with this thing?

-Steve

----- Original Message -----
From: "Darryl L. Pierce" <[email protected]>
To: "Andrew Stitcher" <[email protected]>
Cc: [email protected], "Steve Huston" <[email protected]>, "Ted Ross" 
<[email protected]>, "Kenneth Giusti" <[email protected]>, "michael goulish" 
<[email protected]>
Sent: Monday, August 22, 2011 5:09:45 PM
Subject: Re: Review Request: Provides the EventNotifier type, plus example 
agent and unit test.

On Mon, Aug 22, 2011 at 04:54:46PM -0400, Andrew Stitcher wrote:
> After some googling it seems that Winsock SOCKETs are really not
> equivalent in the way you want to Unix file descriptors and can't in
> themselves be used in the same sort of places. But you can create a
> windows HANDLE from a SOCKET by using WSAEventSelect() but you need to
> know what event (read/write/etc.) you want the HANDLE triggered for.
> 
> In any event the simple #ifdef scheme above is not very useful in the
> real world.

So I guess what we're looking at are possibly two different things. I'm
looking at EventNotifier to, in the getHandle() method, return something
that will work like a file descriptor but on Windows. Is a SOCKET +
recv() combination not going to serve that purpose? I'll defer to
someone with more Windows experience on this. But to me it seems they
should provide the same type of functionality as an FD + polls() or
select().

-- 
Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc.
Delivering value year after year.
Red Hat ranks #1 in value among software vendors.
http://www.redhat.com/promo/vendor/


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to