[Top][All Lists]

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

Re: [lwip-users] Raw TCP - PBuf segment not decreasing

From: Sergio R. Caprile
Subject: Re: [lwip-users] Raw TCP - PBuf segment not decreasing
Date: Mon, 18 Mar 2019 09:11:10 -0300
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Thunderbird/60.5.3

Instead of speculating on a slow receiver, I would see traffic on the
wire and check my tcp_sent() callbacks.
You stuff the TCP buffer with tcp_write() and it will eventually get
sent, you can speed things up as you are doing by calling tcp_output(),
and the stack will let you know when your receiver has ACKed by calling
you at what you provided for tcp_sent(). You should take advantage of
this callback.
I don't think pushing at 2KHz is a good idea, you should perhaps buffer
at your desired speed and send at TCP speed; I mean, queue when you want
to and unqueue at the callback. Perhaps "queue" can be tcp_write() and
"unqueue" tcp_output(), didn't try myself, but remember both must be on
the same context, no 2KHz interrupts please, in such case you will need
a decoupling mechanism.

reply via email to

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