lkml.org 
[lkml]   [2008]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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


\
 
 \ /
  Last update: 2008-09-21 16:21    [W:0.623 / U:1.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site