1. Check if the size of data received is equal with the one you want.
2. Check if the size of data received is equal with the one you sent.
用udp的话不会存在这些问题吧,
楼主说的情况应该是你的程序有问题,你把代码贴出来看看
1. Check if the size of data received is equal with the one you want.
2. Check if the size of data received is equal with the one you sent.
3. Check if you use the option MSG_PEEK in recv call.