I have been looking at the timers some more and trying to figure out how to get
my buffer moved during the interrupt. It looks like there are two timers: 1)
lwIPHostTimerHandler and 2) tcp_poll. I think I have to use the host timer
handler to read information out of my buffers creatively(hopefully while not in
the middle of changing it).
I am trying to learn how the tcp_poll timer function works. I have a function
and set:
tcp_poll(pcb, TCP_Poll, 1);
I found that increasing this value above a 1 can either A) never get called at
a half second interval and B) from wireshark, only sends data out at whatever
the value is. For example, I put a 4 in there and WireShark displays a 2
second gap between send and receives. However, with a 1 in there it sends and
receives data at a 200ms interval and if needed, due to more than one TCP
outgoing packet being full (2*TCP_MSS), it will send all packets at that time.
I don't understand this timer value behavior as the TCP_Poll function I have
written, doesn't really do much (residual from StellarisWare).
if ((hs == NULL) && (pcb->state == ESTABLISHED))
{
tcp_abort(pcb);
return ERR_ABRT;
}
Is there an explanation of how the poll interval timer works this way? I found
that the TCP_SND_QUEUELEN limit is reached very quickly if the value is NOT a 1
which should map to 500 ms based on the slow TCP timer. This makes some sense
as I can send up to sixty tcp_writes in 200 ms alone. In two seconds, this is
over 200. In other words, my code only functions without crashing (with the
disable Ethernet interrupt fix around tcp_write of course) with the poll
interval set to a 1.
Sorry for the piecemeal email. Also, I don't want to be a bother so if I am
asking too many questions, just let me know. If you know of another source I
should tap into (in the US?), I would be interested.
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users