|
From: | address@hidden |
Subject: | Re: [lwip-users] netconn_write blocking |
Date: | Tue, 09 Oct 2007 21:28:25 +0200 |
User-agent: | Thunderbird 2.0.0.6 (Windows/20070728) |
Hi,
Hi!
I have an application that is sending out TCP data to several client using the sequential API. When a client disconnects gracefully, netconn_write returns a negative value, and I can close the connection. However, if any of the clients locks up (i'm using embedded clients), or a cable gets unplugged, etc. netconn_write keeps queue packets until it fills up the buffer, and then blocks. I've been playing around with debugging, and so far all I get is lots of messages about the queue being full.It complains about the queue being full?? That would be a misconfiguration and maybe an error in your port! The queues should never be full! That's why sys_arch_mbox_post has no return value, and the port should assert to check that a queue is never full. Misconfiguration could lead to this: too big TCP windows vs. too small queues...
But to be sure about this, could you post an excerpt of your debug output so that I know which function / file complains?
My question is what is the proper way to deal with ungraceful disconnections using the sequential API? Am I doing something wrong, should netconn_write return an error for ungraceful disconnections, or is there any other way to check if for connection timeouts?Unfortunately, there is only RX timeout currently. TX timeout is planned, I think...
Simon
[Prev in Thread] | Current Thread | [Next in Thread] |