[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Closing a connection
From: |
Ed Sutter |
Subject: |
Re: [lwip-users] Closing a connection |
Date: |
Wed, 14 Apr 2004 12:34:20 -0400 |
Robert,
What about shutdown() and/or closesocket()?
Ed
Robert wrote:
>
> Does anyone know the proper/best way to close a connection which using the
> "raw" interface?
>
> In my application, I am using "heartbeat" messages to more quickly
> determine if packets continue to be able to be passed between client and
> server. Once I detect that the hearbeats messages have stopped arriving,
> I issue a tcp_close(); I would expect that would cause the connection to
> be shutdown. tcp_close() figures out that the connection is in the
> established state, and so then sends a TCP_FIN. After a very long (15
> minutes?) delay, this finally results in a call to my err callback
> routine, which cleans things up.
>
> Is there a better/faster way? Perhaps setting the state to syn_sent
> before calling tcp_close() for example?
>
> --
> Best Regards,
> Robert
>
> Join the fight against spam, support the do-not-email list.
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/lwip-users