Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!milano.sw.mcc.com!lad-shrike!dcj From: dcj@AUSTIN.LOCKHEED.COM (David Jacobson rimux) Newsgroups: comp.unix.programmer Subject: Re: Socket Flush... Summary: Out-of-band data Message-ID: <526@shrike.AUSTIN.LOCKHEED.COM> Date: 2 Apr 91 15:29:49 GMT References: <518@shrike.AUSTIN.LOCKHEED.COM> Organization: Lockheed Austin Div. Lines: 39 > > I have a little different situation than above...maybe someone could > shed some light on it: > > __________ ____________ > | "sender" | ---SOCKET---> | "receiver" | > |__________| |____________| > > My sender is writing data to the receiver via a socket. The > sender is told by another process that all the data it is currently > writing to to the receiver is BAD. Questions: > > Can I clear the socket from the senders (writer's) end? > > Can I read data from a socket I've been writing to and discard it > (bidirectional) ? > > How would YOU keep the receiver from processing the remaining > BAD data its reading from the socket? I have since solved this problem by RTFMing on Out-of-band data (which was specifically invented for clearing sockets as far as I can tell). SunOS Network Programming Guide pp 302 - 304. Unix Network Programming, W. Richard Stevens, pp 332 - 333 ...and see the excellent rlogin example, pp 625 - 665. Thanx to Jonathan Kamens and Mike Sykora for putting me on the right track. David Jacobson. ____________________________________ _______________________________________ . | David C. Jacobson =========___/ \___ Lockheed | (512) 386-4267 =======`/ . \' Austin Division | INTERNET: ====/' `\ (LAD) | dcj@shrike.austin.lockheed.com ____________________________________|_______________________________________