lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] LwIP port on Blackfin, some questions and 1.3.0


From: Jonathan Larmour
Subject: Re: [lwip-users] LwIP port on Blackfin, some questions and 1.3.0
Date: Mon, 26 Nov 2007 14:43:48 +0000
User-agent: Mozilla Thunderbird 1.0.8-1.1.fc3.4.legacy (X11/20060515)

Stéphane Lesage wrote:

4. I have a big problem for handling TCP connection loss.
When I unplug my device, or shut-down the peer,
no error is reported and I can't know the connection is lost.

Is this bug corrected ?

(I currently must send data and time-out, and I feel like doing TCP's job !)

Kieran is working on the TCP persist timer before the 1.3.0 release.

5. About 1.3.0 required features:
-> backlog for listening sockets.
I think this is a very basic feature,
and I actually accidentally learned it was not implemented in this list !

Do bear in mind that lwIP is lightweight, which intrinsically means, not everything will be fully implemented.

-> more documentation about lwip_select(), and implementation of exceptset
How is a TCP connection close reported ?
How is a TCP connection accept reported ?
Why is a new connection on a listening socket reported by readset ?
What will be signalled on exceptset ?

exceptset isn't really used much (and in lwIP not at all). The implementation of lwip_select() would follow that of the standard select. http://www.opengroup.org/onlinepubs/009695399/

So IIRC connection closed is reported by the fd being set in the readfds (which causes an app to do a read, which will then read 0 which means EOF), not the exceptfds.

Connection accepted should mean the fd gets set in the readfds.

At least that's what it should be. If lwIP doesn't do that in practice then that's a bug! But the code looks like it's there.

Actually I noticed something a little odd... in api/api_msg.c, do_close_internal() includes a comment: /* Trigger select() in socket layer. This send should something else so the
       errorfd is set, not the read and write fd! */

But this comment seems wrong. Maybe it's because the author had a misconception that the exceptfds means an "errorfd" which isn't true.

Jifl
--
eCosCentric Limited      http://www.eCosCentric.com/     The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK.       Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["The best things in life aren't things."]------      Opinions==mine




reply via email to

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