lwip-users
[Top][All Lists]
Advanced

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

Re: RE : [lwip-users] Receiving RSTs


From: Jonathan Larmour
Subject: Re: RE : [lwip-users] Receiving RSTs
Date: Tue, 11 Dec 2007 22:45:27 +0000
User-agent: Mozilla Thunderbird 1.0.8-1.1.fc3.4.legacy (X11/20060515)

address@hidden 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




reply via email to

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