[Top][All Lists]

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

Re: [lwip-users] TCP transmission stalls

From: Kieran Mansley
Subject: Re: [lwip-users] TCP transmission stalls
Date: Fri, 16 Jun 2006 14:27:33 +0100

On Fri, 2006-06-16 at 15:15 +0300, Pavel Grishin wrote:
> Hello,
> I am running a test program which sends some text continuously.
> while(1){
>         do{
>                 while(tcp_sndbuf(serv_pcb) < strlen(text));
>                 err = tcp_write(serv_pcb, text, strlen(text), 0);
>                 tcp_output(serv_pcb);
>         }while(err != ERR_OK);
> }
> It transmits a number of times and then stops with err = ERR_MEM.
> Why does it happen?

Probably because you're sending data faster than the other end is
acknowledging it, so your sender starts to fill its TCP send buffer,
using packet buffers in the process.  After a while, you'll run out of
packet buffers, and it will return ERR_MEM.  This is the cue to back off
and try again later.


reply via email to

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