Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ucbvax.BERKELEY.EDU Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!mhuxv!akgua!gatech!seismo!lll-crg!ucdavis!ucbvax!info-vax From: art@ACC.ARPA Newsgroups: mod.computers.vax Subject: RE: TWG sockets Message-ID: <8511231418.AA05778@ucbvax.berkeley.edu> Date: Fri, 22-Nov-85 11:55:00 EST Article-I.D.: ucbvax.8511231418.AA05778 Posted: Fri Nov 22 11:55:00 1985 Date-Received: Sun, 24-Nov-85 11:16:53 EST Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: Organization: The ARPA Internet Lines: 16 Approved: info-vax@sri-kl.arpa > 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" ------