相关文章推荐
  • Knowledge Bases
  • Hi everybody,

    I am using the fnet-stack.

    I create a socket with socket(), bind() and accept().

    The Client connects, I use the socket that is returned by accept()

    and we both can send and receive.

    When the Client disconnects, I see a FIN / FIN ACK / ACK sequence in Wireshark,

    but how does my application know that the connection is closed (or timed out)?

    The socket Status returned by getsockopt() is still 2 = SS_CONNECTED,

    calls to subsequent sendto() do not yield an error

    and the Information is sent as if the connection were still open.


    So, how do I detect when the client has disconnected a TCP-connection?

    Greetings, Martin

     
    推荐文章