lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] TCP FIN question


From: Kieran Mansley
Subject: Re: [lwip-users] TCP FIN question
Date: Thu, 14 Sep 2006 10:46:36 +0100

On Thu, 2006-09-14 at 15:10 +0530, Yadnesh Phadke wrote:

> Why is this the case when, TCP documentation says that the client is
> expected receive FIN from the server?  Is the client always expected
> to send RST to close connection from it's side?  And FIN is used only
> for closing connection initiated by the server? 

TCP connections are duplex, i.e. data can go in both directions, and
each direction is closed independently.  The FIN means "I've finished
sending data in this direction", not "close the connection in both
directions".  The server will send a FIN when it has finished sending
data (i.e. when the server application calls close()).

If you really really must close a connection now and not care about any
data getting lost, then you can use a RST, but it's not meant for normal
closing of connections.

Kieran





reply via email to

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