Re: close() on tcp socket.

Mahavir Jain <[email protected]> Sun, 17 Apr 2011 17:56:15 +0530
Newsgroups org.kernel.vger.linux-c-programming
Message-ID <[email protected]>
Hi Ratheesh,

On Wed, Apr 6, 2011 at 4:30 PM, ratheesh kannoth <[email protected]> wrote:
> connect() system call establishes a connection as shown in below steps.
>
> 1.   |client |  ----------------- syn --------------->  | server |
>
> 2.  |Server|  --------------syn+ ack --------------> | client |
>
> 3.  | Client | -----------------ack --------------------> | Server |
>
>
> But establishing connection , client calls close() system call. Client
> is sending FIN+ ACK to server  [ i expected only FIN to be sent from
> client to server ]
>

Above sequence is correct.

See Q2.7 in following link for more details,
http://www.faqs.org/faqs/unix-faq/socket/

-- 
Thanks,
Mahavir
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html