client { reconnect-delay = 5 read-timeout = 10 message-frame-size = 1048576 reap-futures-delay = 5 reconnection-time-window = 600 # Maximum time window that a client should try to reconnect for }You can also register a listener to Actor.remote, and shut down the client connection upon receiving "akka.remoteinterfaceRemoteClientDisconnected(client, address)" and do client.shutdownClientConnection(address)
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
Thank you very much for your quick reply Victor!
RemoteClientDisconnected did the trick and the ping pong app worked
perfect.
Next I tried to create a chat app (server and client).
Clients connect to server and the server holds their actor refs in a
list.
The problem is when the client is killed by ctrl-c, how to detect that
and remove actor ref from the list?
I know we have events such as RemoteClientDisconnected, but we can't
get actor ref from that (as far as I know).
How can I solve this problem?
Is that race free? The listener is an actor, too, does every dispatcher
guarantee that the client disconnected message will be handled before a
new client process has been started and registered a new client actor
with the same homeAddress?
- Florian.
Of course the listener should be the same actor that manages the actors.
On Mar 8, 2011 6:04 PM, "Florian Hars" <ha...@pre-sense.de> wrote:
On 08.03.2011 17:22, √iktor Klang wrote:
> On the server, remove all actors whose homeAddress are th...
Is that race free? The listener is an actor, too, does every dispatcher
guarantee that the client disconnected message will be handled before a
new client process has been started and registered a new client actor
with the same homeAddress?
- Florian.
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To...
> On the server, remove all actors whose homeAddress are the one that went
> down.
>
> Have a look at ActorRef.homeAddress and compare it to the address supplied
> by the RemoteClientDisconnected event.
I use RemoteServerClientDisconnected but I don't know if I can remove
dead actors correctly, because RemoteServerClientDisconnected provides
address like Some(/136.187.37.xxx:53800) and actorRef.homeAddress
provides address like Some(0.0.0.0/0.0.0.0:2552).
Thanks.
--
Tokyo Univ. Dept. of Information Science 4th grade
Shouichi KAMIYA
Thank you for your help. I really appreciate that!
I use RemoteServerClientDisconnected but I don't know if I can remove
> On the server, remove all actors whose homeAddress are the one that went
> down.
>
> Have a look at ActorRef.homeAddress and compare it to the address supplied
> by the RemoteClientDisconnected event.
dead actors correctly, because RemoteServerClientDisconnected provides
address like Some(/136.187.37.xxx:53800) and actorRef.homeAddress
provides address like Some(0.0.0.0/0.0.0.0:2552).
Thank you very much!
--
Tokyo Univ. Dept. of Information Science 4th grade
Shouichi KAMIYA
> Lemme open a ticket, I'll have a look at it ASAP.Thank you very much!