Open daurnimator opened 8 years ago
This does work on BSD, but not on linux.
On linux, instead we can use edge triggering to know when more data has come in. Example: https://gist.github.com/katlogic/82fa650b8d4196c26e18ca0ebefa77d6
From https://lwn.net/SubscriberLink/752188/0dd72ae73f89c231/
problem appears to to have been fixed in 2008 for the 2.6.28 kernel, though, so the man page is a bit behind the times. Even so, there were still some shortcomings with SO_RCVLOWAT, including spurious wakeups, that Dumazet fixed as a part of this series.
In
so_peek
, SO_RCVLOWAT is used when there is currently no data and the fd needs to bepoll()
'd.From socket(7) man page:
Are there platforms where this actually works?