Archived

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

how to capture the "client droped" exceptions?

Hello,

I took notice of the exceptions throwed by the Ice in the server-side if a client droped and did not destory its communicator(that means the client did not quit gracefully).

The exception output on my console are something like:

04/11/07 00:29:04.313 warning: connection exception:
TcpTransceiver.cpp:297: Ice::ConnectionLostException:
connection lost: WSAECONNRESET
local address = 172.196.4.101:1532
remote address = 172.196.4.101:1527

I'm wondering how to capture these exceptions since I want to do some additional process.

Cheers

Pierre.Siron

Comments

  • matthew
    matthew NL, Canada
    You cannot. The reason is that connections may not be bound to the lifecycle of a client. A client can open up and close many connections during its operation if ACM is enabled (see the Ice manual for more details).

    The correct way to handle this is with sessions, and session timeout. See demo/Ice/session for an example of how to do this.
  • marc
    marc Florida
    See also this FAQ.