Messages in this thread | | | Date | Sun, 21 Sep 2008 15:18:11 +0100 | From | Alan Cox <> | Subject | Re: Honoring SO_RCVLOWAT in proto_ops.poll methods |
| |
> > You might also want to look at the socket(7) man page which implies that > > what Linux currently does is exceptional & incorrect:
Actually we follow 1003.1g draft 6.4 which is about as close as there ever was a spec for BSD sockets. We go beyond it actually - SO_RCVLOWAT/SO_SNDLOWAT are in fact optional.
> SO_RCVLOWAT, and to my surprise even my recv() calls with MSG_PEEK flags > set are not blocking. They block without MSG_PEEK, but not with.
Correct and we've always done that intentionally.
> At this point, for my application to work on Linux without burning CPU like > mad... I basically have to sleep and poll the socket regularly to see if > more data has arrived with the tcp socket ioctl SIOCINQ. :(
What are you actually trying to do ? The usual way to handle urgent data in those odd cases that use it is to select for an exception event.
Alan
| |