A socket question

Donn Cave donn at u.washington.edu
Wed Jan 16 17:33:21 EST 2002


Quoth "Steve Holden" <sholden at holdenweb.com>:
| "Robin Munn" <rmunn at pobox.com> wrote ...
|> On 15 Jan 2002 15:13:20 GMT, Ng Pheng Siong <ngps at madcap.netmemetic.com>
|wrote:
|> >According to Robin Munn <rmunn at pobox.com>:
|> >> "exceptional conditions" (I don't know what constitutes an "exceptional
|> >> condition" on a TCP/IP socket; one of the RFC's should be able to tell
|> >> you).
|> >
|> >OOB data. On the wire these will be TCP segments with the URG flag on.
|>
|> Thanks! I've never written an application where out-of-band data was
|> necessary, so I didn't know that. Has anyone used this in practice? What
|> is it good for?
|
| In practice, not a lot. But consider a Telnet client, for example. Suppose
| the user types commands ahead, one of which places her shell interpreter
| into an infinite loop. The client can't simply queue a "^C" character to the
| server, because it would sit there in the buffer stream forever. So it sends
| out-of-band data, which the server can respond to without processing
| everything that preceded it.

Really?  I know telnet actually does deal with OOB, and I can't say
I understand why or when, but I'm pretty sure it doesn't do it for ^C.
The urgency you're looking at there is a terminal driver function on
the remote end - where it belongs, what would happen if you used ^C
in emacs where it's just another control character?  I have seen telnets
with odd special configurable options for ^C, and maybe they have the
option to send it MSG_OOB, but the telnet source I have on hand (MIT
Kerberos 5 1.2.3, derived from BSD 4.4) does not send any MSG_OOB when
you press Ctrl-C.

	Donn Cave, donn at u.washington.edu



More information about the Python-list mailing list