[EMAIL PROTECTED] wrote:
Jonathan Larmour wrote:

I wonder from what Aparna says:

        When the Windows server is not up, the PC responds with a RST
        for a received SYN. The connect() API returns an error, and the
        client retries connect() after every few seconds.


whether he/she is not closing the socket before calling connect again?

Maybe the netconn API needs to explicitly disallow connects if conn->err is
set?

Either way, if the socket isn't being closed, Aparna needs to fix his/her code.

Normally, the socket API allows calling connect for a second time (when the first call fails and the socket is not already connected).

Oh yes, of course you are right. Aparna's code should be valid for a BSD sockets API, sorry.

LwIP might not allow this, in which case we can argue if there is documentation missing or an assert (or a code change)...

I think in the short term, disallowing based on non-zero conn->err would be best. This could be solved, but probably only when we have the richer set of synchronisation primitives we've been thinking about elsewhere.

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


_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to