From TCP Reads to Application Messages
Delimiter-based framingMark the messages
This example application uses brackets to mark its messages. TCP carries the bytes in order.
Alternate ending · Return to the checkpoint after
[A.
Sender messages
Reserved application delimiters [ ] · US-ASCII bytes
TCP receiver reads
Application parser
Buffer
Parsed messages
Receiver decision
Original run · A and B parsed. A accepted, with an application state record. B rejected on authorization.
Read groups are illustrative. TCP preserves byte order within a connection. Read boundaries can differ from TCP segment and sender write boundaries.