On Tue, 4 Oct 2016 16:24:30 +0200, Sönke Ludwig wrote:
I'll have to look into where exactly it hangs - it could be stuck in
libevent - but one issue is thatsocketPair
creates the sockets in
blocking mode. You'd either have to use the Posixsocketpair
function
together withSOCK_NONBLOCK
, or usefnctl
on the socket(s) created
bysocketPair
to set them to non-blocking mode after creation.
Does FileDescriptorEvent work properly with non-blocking sockets only?
Another question:
after waiting for both read and write event, how to determine which event type occurred?
evt.wait(FileDescriptorEvent.Trigger.any);
if(???) {
// writting
} else {
// reading
}