![]() |
|
|
#4 |
|
Архивный участник
Join Date: Apr 2006
Posts: 461
|
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. |
|
|
|
|