Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
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 6: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 5:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.