Its not terribly feasible actually - especially for TCP. What is done with
telnet is to use TCP "urgent" data to jump "shut up" and "interrupt" type
messages up the packet queues.
> As a last resort, I want to be able to tell the kernel: "forget
> anything about the data you received/sent, since my application-
> level protocol says that I should start thinking of something
> else right from now".
Thats only possible if the lower level protocols can do it. TCP can't,
X.25 cant. The best you can do is reduce the buffering - eg by using
SO_SNDBUF to set the send buffer to say 2 or 3K