qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Huston <shus...@riverace.com>
Subject Re: Review Request: Provides the EventNotifier type, plus example agent and unit test.
Date Mon, 22 Aug 2011 21:49:13 GMT
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" <dpierce@redhat.com>
To: "Andrew Stitcher" <astitcher@redhat.com>
Cc: dev@qpid.apache.org, "Steve Huston" <shuston@riverace.com>, "Ted Ross" <tross@apache.org>,
"Kenneth Giusti" <kgiusti@apache.org>, "michael goulish" <mgoulish@redhat.com>
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:dev-subscribe@qpid.apache.org


Mime
View raw message