This forum has been archived. Please start a new discussion on GitHub.

about the status of client

in our project with ICE, we should know the status of client, the same word, server should know how many clients connected and if they are still alive. of couse, we can do sth like "heartheat", but it is the last choose for us.
but as we know, if we use TCP protocol , ICE can know the connection status of every client, and could show some info if the client disconnect friendly or not.
my question is, how let application know the connection status if using TCP ? does ICE provide some way to do so? thanks lots


  • benoit
    benoit Rennes, France
    You can't easily monitor each client connection of a server. You can access the underlying connection of a proxy or a server invocation since Ice 2.1.0 but this won't allow monitoring (see the "Connection Management" chapter in the Ice 2.1.0 manual for more information). The best way to achieve what you describe is to use session management. The latest Ice newsletter here describes how session management can be achieved with Glacier2.

    Note that even if there was an API to monitor connections in Ice, I don't think this would be a good solution: the server might not always detect the closure of the TCP/IP connection in a timely manner, if you use active connection management connections can be closed and re-opened.