3

kqueue gives available bytes to send or receive if file descriptior (such as socket) gets signal. and, kqueue gives threshold feature, for example, it does not signal until sufficient bytes are available to read or write if user wants.

Are these two features also given by epoll? I googled for it but I couldn't find them yet.

  • I strongly suspect it doesn't... – Celada Mar 28 '12 at 21:41
  • Very unlikely. Kqueue allows to override per-socket low watermark. Linux supports low watermark (see socket(7), SO_RCVLOWAT) but in broken way, according to my manpage: it's used on reading but not on polling, so polling give false positives. Avoid to use it. – Netch Mar 29 '12 at 06:13
  • Thank you all. Intention for these two features is to minimize calling count of send() or recv() and preventing worker thread from becoming idle state. Is there any alternative way of achieving this intention? – Hyunjik Bae Mar 30 '12 at 05:18

0 Answers0