akka - Can I change which Actor handles a TCP connection? -


after having "registered" actor handle tcp connection, can re-assign later on actor?


i want because:

step 1: have actor listening socket.

io(tcp) ! bind(self, new inetsocketaddress("localhost", 12345)) 

step 2: receive incoming connection.
@ point all know remote address (hostname , port). based on register actor handle incoming data connection.

def receive = {   case connected(remote, local) =>     sender ! register(handleractor(remote)) } 

step 3: first messages exchanged.
i have more application level information connection , i'd actor placed somewhere else in hierarchy handle it.


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -