On 10/3/2017 4:47 AM, Flavio Gobber wrote:
Hi lwip users,

I have implemeted an application with lwip on a blackfin board.
The stack is working with ping and TCP socket with short message, less than 1400 bytes. I need to implement a server which need to receive message large more than the length of 1400 bytes. What I see if the recv function return only a length of 1464 bytes, I can repeat the the recv function before to parse the message, but how can understand that the message is ended. This because the message doesn't have the length information and the length could change between a message and the Others.

TCP is a stream protocol, meaning that you can get any number of bytes at any time and there is no guarantee that they'll be received in the same sized chunks as they were sent.

You'll need to add length information to your protocol if the protocol has no other way to tell where "messages" start and stop.

Patrick Klos
Klos Technologies, Inc.


_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to