Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 8/7/84; site ucbvax.ARPA Path: utzoo!watmath!clyde!burl!hou3c!hocda!houxm!mhuxj!mhuxn!mhuxl!ulysses!ucbvax!info-vax From: info-vax@ucbvax.ARPA Newsgroups: fa.info-vax Subject: Re: Networking query Message-ID: <2037@ucbvax.ARPA> Date: Wed, 19-Sep-84 12:11:37 EDT Article-I.D.: ucbvax.2037 Posted: Wed Sep 19 12:11:37 1984 Date-Received: Tue, 25-Sep-84 06:19:43 EDT Sender: daemon@ucbvax.ARPA Organization: University of California at Berkeley Lines: 25 From: Richard GarlandPaul: It occurs to me that a much simpler way to empty the type-ahead buffer (simpler than the mailbox AST) is to simply do a large read with timeout with time=0. This has been suggested to me several times over the years as the quickest way to say "give me all you got". There is also a status type QIO I think which returns the number of characters in the type- ahead buffer. Using that you couls then do another read to get everything. One function I always wanted was "read whole type-ahead buffer" but alas that is missing. Another issue is where your process goes when it is waiting. You couls be event flag driven and be in LEF or you could be AST driven and be in HIB. The time it takes to reschedule and the probability of being swapped out may differ in these 2 cases. I'm not sure which is better but the stuff I'm using now is AST driven with HIBERs and WAKEs. The character passthrough is at program level with just a wakeup being done at AST level. Others (e.g. KERMIT) do all the character passthrough at AST level. You might try combinations of these things. I avoided doing the passthrough at AST level since I wanted to spawn subprocesses and such depending on special escape codes in the character stream. Rg -------