Skip to content

TCP Streaming/Segmentation issue #1

Open
@ademclk

Description

@ademclk

There’s a problem that when you send multiple messages to the client, they receive it as a single message.

This is a common issue with TCP, which is a stream-based protocol and does not guarantee that messages will arrive as sent. Instead, TCP guarantees that all bytes will arrive in the order they were sent.

This means that if we send two messages, "Hello" and "World", it's possible that the client will receive them as a single message, "HelloWorld". It causes an error while checking parity bits.

To handle this, implement a message framing protocol on top of TCP. One common method is to prefix each message with its length.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions