I have a client and a server communicating to one another over a standard TCP connection.
The server is configured to send data in consistently sized chunks of x bytes. The client is also configured to receive data in chunks of x bytes (i.e. the client expects that the call to the TCP stack to receive x bytes will be successful unless the connection with the remote end has failed).
Is it OK to base my TCP based protocol on the assumption above?
Deja vu Will TCPStream read block until all data is received.
I realize it looks a little different but at the core they are very similar questions.
Don’t make assumptions about packet sizes.