|
From: | address@hidden |
Subject: | Re: [lwip-users] howto put tcp packet together |
Date: | Wed, 29 Apr 2009 16:24:49 +0200 |
User-agent: | Thunderbird 2.0.0.21 (Macintosh/20090302) |
Data gets parted in 2 ways: - the remote host may split the data in multiple network packets - lwIP may split a received packet into multiple pbufsThere is however nothing unsorted. I.e. the pbufs you receive hold the data in exactly the same order as the remote host sent it. If you don't get the full data in the first call to your receive callback (be sure to check all pbufs you have been passed: check the ->next pointers until NULL), you can just hold on to these pbufs (don't free them yet) and process them all together later when the receive callback is called again.
The number of packets is not known in advance (as the remote host creates them as it likes); a counter that specifies the order is not needed as they are always *in order*. Basically, you get one call to the receive callback for every packet received. To get an overview over these packets, a network sniffer like wireshark is always interesting.
Simon Bernhard 'Gustl' Bauer wrote:
Hi,I'm using HTTP server in contrib. Unfortunately it assume all data is in one packet. In my situation data is spread over several packets. I need to fit them together in the right order before processing. Any pointers how to do this would be great. What I'm especially looking for is the number of packets and a counter that specifies the order.TIA Gustl _______________________________________________ lwip-users mailing list address@hidden http://lists.nongnu.org/mailman/listinfo/lwip-users
[Prev in Thread] | Current Thread | [Next in Thread] |