home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.unix.aix:13711 comp.unix.internals:2166
- Path: sparky!uunet!opel!johnk
- From: johnk@opel.secondsource.COM (John Kennedy)
- Newsgroups: comp.unix.aix,comp.unix.internals
- Subject: Anyone have non-blocking I/O on UDP sockets working on AIX?
- Message-ID: <280@opel.secondsource.COM>
- Date: 25 Jan 93 18:06:02 GMT
- Reply-To: johnk@secondsource.COM (John Kennedy)
- Followup-To: comp.unix.aix
- Organization: Second Source, Inc., Annapolis, MD
- Lines: 25
-
- Does anyone have non-blocking I/O on UDP sockets to work on AIX?
-
- I have tried three different approaches, all returning valid return codes,
- but none having any real effect:
-
- 1) fcntl, turning on O_NDELAY. This approach works on Interactive Unix,
- but subsequent calls to recvfrom() on AIX 3.2 still block.
-
- 2) fcntl, turning on O_NONBLOCK. This is the tradiditional value (0x04)
- associated with O_NDELAY on System V systems.
-
- 3) ioctl(fd, FIONBIO) returns a zero status from the ioctl(), but subsequent
- calls to recvfrom() on AIX 3.2 still block.
-
- The above is hard to prove directly since the macro _IO defined in ioctl.h
- (where FIONBIO is defined) clashes with the macro _IO defined in stropts.h
- (used by STREAMS).
-
- Should MSG_PEEK with recvfrom() work to see if a message is waiting?
- If so, one would think non-blocking I/O would work.
-
- The response I am looking for is that I'm doing something really stupid.
- Anyone?
-
- --
- John Kennedy uunet!opel!johnk
- Second Source, Inc. johnk@secondsource.COM
- Annapolis, MD
-