strange goings on with an io watcher in windows

Ed Bukhman ebukh at yahoo.com
Wed Jan 13 08:41:31 CET 2016


I'm hoping there is a good explanation for the behavior I'm seeing. I 
have a relatively simple client application which connects to a server 
and subscribes to a feed. The socket on the client is then associated 
with an io watcher running in the main event loop, so that messages are 
received and processed in a non-blocking way. The problem I'm 
experiencing is that it takes anywhere from 30 seconds to a minute for 
the watcher to be triggered for the first time, even though the server 
is emitting a message every couple of seconds. Once it has been 
triggered the first time, it then starts to respond to the messages as 
it is supposed to. Neither the size of the messages nor the frequency 
appears to have much influence on this delay.
I have confirmed with tcpdump that the server does in fact send every 
message. Also, if I take the recv() logic out of the callback function 
associated with the watcher and run it synchronously, everything works 
properly.
I'm at a loss to explain the observed behavior, and would appreciate 
either an explanation, or follow-up questions that would allow us to get 
to the cause of this.
Thank you
--Ed



More information about the libev mailing list