[Top][All Lists]

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

Re: [lwip-users] How to detect FIN / remote closed connection with netco

From: Kieran Mansley
Subject: Re: [lwip-users] How to detect FIN / remote closed connection with netconn API?
Date: Fri, 03 Jun 2011 08:57:36 +0100

On Thu, 2011-06-02 at 15:11 -0700, Couch, Kelly J wrote:
> I have observed that a NETCONN_EVT_RCVPLUS with a 'len' of 0 coincides
> with connection events (but am uncertain if this is the ONLY reason
> for a 0 length event)

You will get a zero length event when:
 - the connection is first established 
 - the connection is closed either due to FIN, RST, local close or error
 - you receive a zero length UDP datagram.  

This last one (the zero length datagram) is probably something we need
to look into to check that the higher layers give correct behaviour, but
if your application isn't doing zero length sends then you can probably
ignore that and assume that an event with len=0 means the connection is
just opened or just closed.


reply via email to

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