home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / unix / aix / 13711 < prev    next >
Encoding:
Internet Message Format  |  1993-01-25  |  1.5 KB

  1. Xref: sparky comp.unix.aix:13711 comp.unix.internals:2166
  2. Path: sparky!uunet!opel!johnk
  3. From: johnk@opel.secondsource.COM (John Kennedy)
  4. Newsgroups: comp.unix.aix,comp.unix.internals
  5. Subject: Anyone have non-blocking I/O on UDP sockets working on AIX?
  6. Message-ID: <280@opel.secondsource.COM>
  7. Date: 25 Jan 93 18:06:02 GMT
  8. Reply-To: johnk@secondsource.COM (John Kennedy)
  9. Followup-To: comp.unix.aix
  10. Organization: Second Source, Inc., Annapolis, MD
  11. Lines: 25
  12.  
  13. Does anyone have non-blocking I/O on UDP sockets to work on AIX?
  14.  
  15. I have tried three different approaches, all returning valid return codes,
  16. but none having any real effect:
  17.  
  18. 1) fcntl, turning on O_NDELAY.  This approach works on Interactive Unix,
  19.    but subsequent calls to recvfrom() on AIX 3.2 still block.
  20.  
  21. 2) fcntl, turning on O_NONBLOCK.  This is the tradiditional value (0x04)
  22.    associated with O_NDELAY on System V systems.
  23.  
  24. 3) ioctl(fd, FIONBIO) returns a zero status from the ioctl(), but subsequent
  25.    calls to recvfrom() on AIX 3.2 still block.
  26.  
  27. The above is hard to prove directly since the macro _IO defined in ioctl.h
  28. (where FIONBIO is defined) clashes with the macro _IO defined in stropts.h
  29. (used by STREAMS).
  30.  
  31. Should MSG_PEEK with recvfrom() work to see if a message is waiting?
  32. If so, one would think non-blocking I/O would work.
  33.  
  34. The response I am looking for is that I'm doing something really stupid.
  35. Anyone?
  36.  
  37. -- 
  38. John Kennedy                     uunet!opel!johnk
  39. Second Source, Inc.              johnk@secondsource.COM 
  40. Annapolis, MD
  41.