1

Closest resemblance to my question was posted here.

However, I am still having troubles understanding how a TCP data stream creates "messages" if you will. Arn't messages things that happen after xx amount of time? A TCP stream is a constant flow of data.

For example, a game server running at 30hz. If messages are sent out at 30 times a second, they must be using something internally to do that, what is it?

Community
  • 1
  • 1
  • [This](http://stackoverflow.com/questions/16001434/async-tcp-server-message-framing-advice/16001812#16001812) answer may help a bit. – HABO Apr 16 '17 at 03:09
  • By the application. TCP doesn't have messages. It's up to application code to do that. – user207421 Apr 16 '17 at 03:36
  • 1
    Buffer the stream and extract only complete messages. You define what a complete message is (fixed length, terminated with nul or newline, write length then data, etc.) – Mark Tolonen Apr 16 '17 at 03:51

0 Answers0