lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Failing to call tcp_write 10 times per second


From: Roman Khazanskii
Subject: Re: [lwip-users] Failing to call tcp_write 10 times per second
Date: Fri, 18 Jan 2019 16:14:50 -0700 (MST)

>According to this document
>https://www.eremex.ru/upload/iblock/d11/lwip_rawapi.pdf
>the top of page 4 says:
>"TCP data is sent by enqueueing the data with a call to tcp_write(). When
>the data is successfully transmitted to the remote host, the application
>will be notified with a call to a specified callback function."
>So I think you should do the same instead of successive tcp_writes without
>being sure that the data was sent.

And a little lower on the same page I read: "The proper way to use this 
function is to call the function with at most tcp_sndbuf() bytes of data. 
If the function returns ERR_MEM, the application should wait until some 
of the currently enqueued data has been successfully received by the 
other host and try again."

I interpet this as "the application should wait only if tcp_write returns
ERR_MEM". 
My calls of tcp_write didn't return ERR_MEM so I presumed that's how
I'm supposed to do it.

Also if I'm going to wait for the end of transmission, sending frequency 
would be too low.




--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html



reply via email to

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