I have created a RMI connection but I do not know how to notify the server when the client ends or crashes. I have found the unreferenced() method, but it does not work. Any idea?
(the server is multiclient, there is only one kind of object passed to the client but any client has a different instance of it).
Thanks.
The problem with that is that if the client crashes, it's hard to have it do anything, and you end up waiting for timeouts.
The usual solution is to set up a "heartbeat", a periodic call; if the client heartbeat doesn't get to you after, say, 2 periods, you figure it's dead.