Archived

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

How can client know the status that client and server disconnceted?

Hi!
In a LAN , many PC are installed ICE server program and one PC are installed ICE client program.

The PC runs many ICE Client services and connctes to many PC.

When some PC that installed ICE server is disconnect , how can the pc know which pc disconnced ?

Thanks a lot!

Comments

  • benoit
    benoit Rennes, France
    As Matthew mentioned in [thread=1453]this thread[/thread], the best way to do this is to implement a session based client: your client creates a session with the server and refresh the session from a thread periodically.

    If the client call to refresh the server session fails, it's a good indication that the connection with the server might have been lost.

    Please checkout the session demo in the demo/Ice/session directory of the Ice 2.1.1 distribution. It demonstrates how to implement this session manager scheme.

    Hope this helps,

    Benoit.
  • Thank you!