lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] tcp_write problem after the first transmission


From: PHAM ANH THIEN
Subject: Re: [lwip-users] tcp_write problem after the first transmission
Date: Thu, 28 Jan 2010 15:23:52 +0700

i think your memory only support alloc function not support free function, pls check it 1st. otherwise, you turn on macro TCP_DEBUG & TCP_OUTPUT_DEBUG and check what happen in the log file.

On Wed, Jan 27, 2010 at 10:00 PM, Daniel Berenguer <address@hidden> wrote:
I'm trying to send a bunch of TCP packets using the raw API but
tcp_write is returning -1 (out of memory) after the 8th packet.

for (i=0 ; i<20 ; i++)
{
   strcpy(buffer, "holaaa");
   res = tcp_write(pcb, buffer, 7, 0);
   tcp_output(pcb);
}

I've used many variants of the above code (with delays, w/o
tcp_output, ...) but the problem is always there. The first packet is
sent immediately after the first tcp_write but then, tcp_write just
pushes the packets into the sending queue. TCP_SND_QUEUELEN is set to
8 so once the TX queue gets overflowed tcp_write starts returning -1
and the contents of the queue is finally sent (only 7 packets of 20
though).

Any idea?

Thanks.


_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users


reply via email to

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