home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.wizards
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!wupost!usc!cs.utexas.edu!torn!cunews!nbkanata!nexus!todds
- From: todds@Newbridge.COM (Todd Sandor)
- Subject: Re: Out-of-band data on sockets
- Message-ID: <1992Jul21.141619.12933@Newbridge.COM>
- Sender: usenet@Newbridge.COM (USENET News System)
- Nntp-Posting-Host: faerie_queene
- Organization: Newbridge Networks Corporation
- References: <1992Jul17.090725.246@gamelan>
- Date: Tue, 21 Jul 1992 14:16:19 GMT
- Lines: 49
-
- In article <1992Jul17.090725.246@gamelan> thf@zelator.in-berlin.de (Thomas Funke) writes:
- )A process is expecting (waiting for) OOB-Data (out-of-band, urgent) on
- )a stream-socket. I'm doing a 'select' with the exception-fd's enabled,
- )and that works. The problem is, that sometimes the select returns too
- )early, so a following 'recv' with MSG_OOB does fail. Currently I'm
- )polling the 'recv', thus looping until it returns OK, but I believe
- )that is not a good solution.
-
- Similiar problems exist with SunOS 4.1.1. With SunOS, the select returnsindicating OOB data, then read the OOB data (all is OK), then go into
- the select again and select returns with OOB data pending (nothing
- has been sent). If try to read the OOB data you get a an error with
- errno indicating an Invalid argument.
- In talks with Sun, this is a problem in the original BSD code, they
- we NOT planning on fixing it the last time I looked into it. (I believe
- there fix was to change the documentation to indicate how the functionality
- worked, rather then fixing the bug so it worked as documented).
-
- (Problem is the select with exception-fd enabled will ALWAYS return with
- something to read after the first OOB data is received - reading the
- OOB data makes no difference).
-
- Anyone have any luck in getting Sun to fix this problem?
-
- )The SIGURG-signal does not work either, it's also sent too early. I'm
- )running a AIX/RS6000 and a NeXT, both with the same behaviour. And from
-
- )the docs, I think this is a feature not a bug :-(
-
- The SIGURG stuff has problems under the SunOS as well. It doesn't work
- correctly when have lost of data in the send and receive buffers of
- the sockets. I tried testing by increasing the
- send and receive buffers on both ends of the socket connection, and
- then had the sender send data until it would have blocked (using non-blocking
- sockets) and then the sender sent the OOB data. The OOB data was delivered
- to the remote OS (netstat -a shows the send and receive buffer sizes, thereceive buffer on the remote end increased by 1), but
- the SIGURG was not delivered immediately. The receiver had to read data
- from the socket before it received the signal. THEN, in the signal
- handler the OOB data could NOT be read. The signal handler had to
- read some data from the socket before it could read the OOB data.
- Note: If there is not lots of data in the send and receive socket buffersthings seem to be OK, but the functionality is not consistant (changes
- depending upon the amount of data in the socket buffers, which in my
- opion is a bug)....
-
- Anyone have better experiences with OOB data under SunOS?
- --
- OSI buys you the promise of richer applications than the IP suite
- at the cost of immaturity, complexity, inefficiency and incompleteness.
- Todd Sandor Newbridge Networks: Kanata, Ontario Canada
- todds@newbridge.com
-