Remix.run Logo
rlpb 6 hours ago

TCP has an "urgent data" feature that might have been used for this kind of thing, used for Ctrl-C in telnet, etc. It can be used to bypass any pending send buffer and received by the server ahead of any unread data.

ralferoo 9 minutes ago | parent | next [-]

Just googling it now and TCP urgent data seems to be a mess.

Reading the original RFC 793 it's clear that the intention was never for this to be OOB data, but to inform the receiver that they should consume as much data as possible and minimally process it / buffer it locally until they have read up to the urgent data.

However, the way it was historically implemented as OOB data seems to be significantly more useful - you could send flow control messaging to be processed immediately even if you knew the receiving side had a lot data to consume before it'd see an inline message.

It seems nowadays the advice is just to not use urgent data at all.

mike_hearn 5 hours ago | parent | prev | next [-]

Fun fact: Oracle implements cancellation this way.

The downside is that sometimes connections are proxied in ways that lose these unusual packets. Looking at you, Docker...

ZiiS 4 hours ago | parent | prev [-]

Unfortunately the can be many buffers between you and the server which "urgent data" doesn't skip by design. (the were also lots of implementation problems)