home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / wizards / 3266 < prev    next >
Encoding:
Text File  |  1992-07-20  |  3.2 KB  |  62 lines

  1. Newsgroups: comp.unix.wizards
  2. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!wupost!usc!cs.utexas.edu!torn!cunews!nbkanata!nexus!todds
  3. From: todds@Newbridge.COM (Todd Sandor)
  4. Subject: Re: Out-of-band data on sockets
  5. Message-ID: <1992Jul21.141619.12933@Newbridge.COM>
  6. Sender: usenet@Newbridge.COM (USENET News System)
  7. Nntp-Posting-Host: faerie_queene
  8. Organization: Newbridge Networks Corporation
  9. References: <1992Jul17.090725.246@gamelan>
  10. Date: Tue, 21 Jul 1992 14:16:19 GMT
  11. Lines: 49
  12.  
  13. In article <1992Jul17.090725.246@gamelan> thf@zelator.in-berlin.de (Thomas Funke) writes:
  14. )A process is expecting (waiting for) OOB-Data (out-of-band, urgent) on
  15. )a stream-socket. I'm doing a 'select' with the exception-fd's enabled,
  16. )and that works. The problem is, that sometimes the select returns too
  17. )early, so a following 'recv' with MSG_OOB does fail. Currently I'm
  18. )polling the 'recv', thus looping until it returns OK, but I believe
  19. )that is not a good solution.
  20.  
  21. 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
  22. the select again and select returns with OOB data pending (nothing
  23. has been sent).  If try to read the OOB data you get a an error with
  24. errno indicating an Invalid argument.
  25. In talks with Sun, this is a problem in the original BSD code, they
  26. we NOT planning on fixing it the last time I looked into it. (I believe
  27. there fix was to change the documentation to indicate how the functionality
  28. worked, rather then fixing the bug so it worked as documented).
  29.  
  30. (Problem is the select with exception-fd enabled will ALWAYS return with
  31. something to read after the first OOB data is received - reading the
  32. OOB data makes no difference).
  33.  
  34. Anyone have any luck in getting Sun to fix this problem?
  35.  
  36. )The SIGURG-signal does not work either, it's also sent too early. I'm
  37. )running a AIX/RS6000 and a NeXT, both with the same behaviour. And from
  38.  
  39. )the docs, I think this is a feature not a bug :-(
  40.  
  41. The SIGURG stuff has problems under the SunOS as well.  It doesn't work
  42. correctly when have lost of data in the send and receive buffers of
  43. the sockets.  I tried testing by increasing the
  44. send and receive buffers on both ends of the socket connection, and
  45. then had the sender send data until it would have blocked (using non-blocking
  46. sockets) and then the sender sent the OOB data.  The OOB data was delivered
  47. to the remote OS (netstat -a shows the send and receive buffer sizes, thereceive buffer on the remote end increased by 1), but
  48. the SIGURG was not delivered immediately.  The receiver had to read data
  49. from the socket before it received the signal. THEN, in the signal
  50. handler the OOB data could NOT be read.  The signal handler had to
  51. read some data from the socket before it could read the OOB data.
  52. 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
  53. depending upon the amount of data in the socket buffers, which in my
  54. opion is a bug)....
  55.  
  56. Anyone have better experiences with OOB data under SunOS?
  57. -- 
  58. OSI buys you the promise of richer applications than the IP suite
  59. at the cost of immaturity, complexity, inefficiency and incompleteness. 
  60. Todd Sandor                        Newbridge Networks:  Kanata, Ontario Canada
  61. todds@newbridge.com
  62.