lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] recv and sent callbacks usage


From: Kieran Mansley
Subject: Re: [lwip-users] recv and sent callbacks usage
Date: Thu, 11 Aug 2011 14:15:40 +0100

On Thu, 2011-08-11 at 21:11 +0800, narke wrote:
> Hi,
> 
> I have a few questions about the raw api:
> 
> 1. When a connection received 3 segments, how many times the recv
> callback will be called?
> 2. After continuously  did 3 times of tcp_write, how many times the
> sent callback will be got called after all the data have been sent out
> and acknowledged?

I think both of the above are undefined by the API.  I.e. you shouldn't
rely on any particular behaviour.  You may get called once, you may get
called 3 times, you may get called more.  

> In the sent callback, how do I understand and use
> the 'len' argument?

It tells you how many bytes have been sent and acknowledged, and so you
no longer need to maintain the next "len" bytes of data as valid.

Kieran




reply via email to

[Prev in Thread] Current Thread [Next in Thread]