Hi I'm just starting to create a client/server app using Akka TCP over a socket. I've got it basically working, but what I want to know is, once I've registered a handler with the Server socket with TcpMessage,register(), can I change the handler by issuing a second TcpMessage.register() message at a later stage? I suspect that the answer is no, since when I try it the original handler continues to receive the client messages, but since I've only started using Akka to communicate over sockets I just want to check that I'm not missing something that would allow me to do this.
The reason that I want to change the handler in midflow is that the client is talking to a device attached to the serial port on the remote machine. Once the connection from the client is established then I need to perform a standard handshake that, among other things, establishes the model and version of the device attached to the client. I need different message processing and flow on the server depending upon the remote device/model. Obviously I can do this using "become" - but this is going to make my socket handler very large and unwieldy - it would be nice if I can just swap to the appropriate handler and install it as the socket handler after the handshake is complete. Regards. -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.