It's a little terse, and assumes you understand TCP flow control.
In TCP, each end has a "receive window"; this is a buffer for storing bytes
received from the other machine. You tell the other machine how big your receive
window is when the connection opens. The remote machine is not allowed to send
you more bytes at a time than the spare space in your receive window.
Each time you receive a chunk of data from the remote machine, you send an
acknowledgement back, and you tell it how big the remaining receive window is,
and which chunks you've received.
If both sides are behaving properly, the remaining receive window can only
shrink as a result of data sent by the remote machine. The "Treason Uncloaked"
message is generated when the remote end shrinks the receive window it's offering
in an acknowledgement by *more* than the size of the chunks it's acknowledged.
For a worked example:
We open a connection; I say I can receive 1024 bytes at a time, but not my
(my initial receive window).
You send me 500 bytes; I acknowledge receiving them, and tell you I can take
another 524 bytes (legal, as I've only reduced the window by the amount you
sent).
You send me another 524 bytes; I acknowledge receiving them, and tell you
that you can send another 900 bytes (legal, because I'm expanding the receive
window, not reducing it).
You send me 800 bytes; I acknowledge them, and tell you that you can send
another 300 bytes (again, legal – I'm decreasing the receive window by less
than the amount of data I've acknowledged).
You then send me 150 bytes; I acknowledge them, and tell you that you can
send another 100 bytes. This triggers "Treason Uncloaked!" – you sent me 150
bytes, I'd previously claimed I could accept a total of 300 bytes, and now I'm
suddenly changing my mind and saying "actually, I could only accept 250 bytes
– I lied when I said I could accept 300 bytes".
Klingon
Warbird Captain Lo'Tok
How dare you attempt to intercept our communications through the neutral
zone! This is Captain Lo'Tok of the Klingon Warbird Rahi. I have been monitoring
your blog now for three weeks as your ship has been orbiting Planet Druidia.
The Klingon Empire will not tolerate TCP or Treason of any sort!
Do not defy my request to leave orbit of Planet Druidia!
Sincerely,
Captain Lo'Tok
Klingon Warbird Rahi
Scott
Soto