On Mon, 2009-08-10 at 05:50 -0700, Chris Strahm wrote: > What does the 1 byte length mean?
It's called, I'm guessing, when the other side processes the FIN. The sent callback is called as a result of data being ACKed, which means that buffer space should be available to send. It just so happens in this case that the sequence being acked is the FIN to mark the end of the connection. This could probably be improved, as I can see it's confusing and not useful. Feel free to file a feature request bug on savannah. > Why does close get called twice? I'm guessing that you're using code based on the httpserver_raw example. If you look at that source, close_conn() is called for a number of reasons. The first is from the http_sent() callback if there's no data left, so almost certainly being triggered by the behaviour outlined above. The second is when it receives a packet and it's either not a GET request, or it's a NULL pbuf. You're almost certainly seeing a NULL pbuf passed to the receive callback which means that the other end has closed the connection. This is normal, as you have finished the HTTP transaction - it's just the way that the other end closing a connection is signalled through the API. Kieran _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
