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.
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)
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...