0

If I have a socket and someone sent data to it that I didn't yet handle via read(), and now I make an ev_io watcher for it and run it, will the callback fire?

thejh
  • 44,854
  • 16
  • 96
  • 107

2 Answers2

1

I don't know the answer to your question as I've never used libev. But I can suggest in the absence of this knowledge you might try to simulate the scenario and see what happens. :-)

Chimera
  • 5,884
  • 7
  • 49
  • 81
1

It's level-triggered, not edge-triggered, so the callback will fire rapidly until all the pending data was read.

thejh
  • 44,854
  • 16
  • 96
  • 107