View Single Post
Old 07.11.2006, 09:44   #4
mcrabben7
Архивный участник
 
Join Date: Apr 2006
Posts: 461
Default

TCP is a Streaming Protocol, please go read what that means. It doesn't matter if you use Sync or Async sockets, the TCP packets will come at you in order, but they will have no packet breaks. In essence, you will get one giant, never-ending stream of bytes. This is why you have to read the len from the packet and only read len bytes. Otherwise, you will never know where the start and end of a packet are.

I did socket programming in C++ using TCP, so I'm not talking up a storm without experience.
mcrabben7 is offline