Socket Flush...
David Jacobson rimux
dcj at AUSTIN.LOCKHEED.COM
Wed Apr 3 01:29:49 AEST 1991
>
> 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 at shrike.austin.lockheed.com
____________________________________|_______________________________________
More information about the Comp.unix.programmer
mailing list