[mod.computers.vax] TWG sockets

art@ACC.ARPA (11/22/85)

> Does anyone know if there is a way to see if there is data ready to read
> on a socket (using TWG's IP/TCP for VMS)?  Under UNIX, you could use
> select, but TWG did not seem to implement select.  I realize I could use
> an asynchronous QIO, but I want to find out if there is a synchronous
> way to do this.

I believe that the flags argument on the recv() calls will do what you want.
The MSG_PEEK flag (0x01) or'd into the flags argument will return the
number of bytes without actually moving them.  I ran into this with a program
bug which caused an infinite loop trying to read.  If using QIOs, I believe
P3 is the flags argument (doesn't appear to be documented in QIO spec).

				"Art Berggreen"<Art@ACC.ARPA>

------