cancel
Showing results for 
Search instead for 
Did you mean: 

A problem when receiving data with TCP LwIP

NLong.1
Associate

0693W00000GZ2oXQAT.png0693W00000GZ2vDQAT.jpgI had a problem when receiving data with TCP LwIP: Because TCP max segment size is 1460 so I can not receive the whole response from the server (2.75KB), I just received only 1440 Bytes. Are there any ways to receive full the response data? Can someone help me with this?

1 REPLY 1

Hello @Nguyễn Long​ ,

Independently from the maximum PDU size, it is possible to send (and receive) an arbitrary data size in TCP using the segmentation mechanism: TCP Segmentation - InetDaemon's IT Tutorial

To benefit from this mechanism a TCP connection is considered as a stream instead of discrete packets (which is the case by definition). The data needs to be assembled on reception or processed piecewise.

Therefore, on each packet reception the data is to be assembled instead of considering the data to be fully contained in a single packet.

Otherwise, could you attach a network capture (using Wireshark for example) of the interaction with the issue?

BeST Regards,

Walid