lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Knowing when TCP data has been sent


From: Kieran Mansley
Subject: Re: [lwip-users] Knowing when TCP data has been sent
Date: Mon, 22 Mar 2010 13:22:52 +0000

On Mon, 2010-03-22 at 14:00 +0100, Sägesser Walter wrote:
> 
> Basically it works, i.e. the semaphore is eventually posted, but
> unbearably slow (delay of ca. 200ms for each frame). Without this
> callback, using NETCONN_COPY for netconn_write, the throughput is at
> least 120 times better. Thus I conclude that I have misused the
> callback function for something it is not designed for. On the other
> hand I do not find a better way to get a "done" trigger. Is there a
> better way or do I have to copy the outgoing data (which would violate
> the concept of a non-copy interface)?

Is it slow because you're sending one packet, and then waiting for the
callback?  With TCP this could wait for a very long time (as you've
seen) as it needs the other side to ACK it before it can free the buffer
and call the callback.  You could get around this by sending lots of
buffers without waiting for the callback, and then freeing each one when
its callback is called.

Kieran





reply via email to

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