In order for tcp_write() and tcp_output() to successfully complete, doesn't the user code need to call LwIP to check for ACK packets to flush the data out of the tcp_output queue?
Matthew Yingling -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Christiaan Simons Sent: Tuesday, May 02, 2006 4:02 AM To: Mailing list for lwIP users Subject: Re: [lwip-users] netconn_write loops Edwin wrote: > This problem has been posted in 2005 but got no response which i can see.. > in api_lib.c. > In the function netconn_write the semaphore which is waited on when > tcp_sndbuf( conn->pcb.tcp ) returns 0. There is mention of a patch of which > I expect that it will be integrated in lwip v 1.1.1. If we're going to fix it, it will be changed in the HEAD version (CVS). > But we still experience the connection loops in netconn_write at that point. > > In the api_msg.c in the function do_write, tcp_write is called. > at some point tcp_write returns an error. Do you remember which error? ERR_MEM is commonly returned by tcp_write(), this indicates you'll have to back-off for a while so that tcp_output() actually outputs the queued data. > This isn't always a problem > but sometimes it just keeps returning errors. The correct usage of tcp_write(), tcp_output() etc are described in the liwp/doc/rawapi.txt Regards, Christiaan Simons Hardware Designer Axon Digital Design http://www.axon.tv _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
