Hi, I'm following Play's manual to create websockets, using actors. I got it working that the actor "echoes" incoming messages but struggling to find how to push arbitrary messages to it. With the synchronous version I can store a reference to `out`:
def socket: WebSocket[String, String] = WebSocket.acceptWithActor[String, String] { request => out => // can store out to send msgs to it TmpActor.props(out) } But I can't do this with the asynchronous version: def socket: WebSocket[String, String] = WebSocket.tryAcceptWithActor[String, String] { request => val props = TmpActor.props _ Future(Right(props)) } I tried adding `out` parameter like in the synchronous version but can't get it to compile. I'm also not sure if this is the right approach to store references to the actors. And I can't find anything to write to the socket itself. This is to build functionality similar to a chatroom... I found e.g. this project https://github.com/JAVEO/clustered-chat/ but still can't find how to send a server-triggered message... Thanks, Ivan -- >>>>>>>>>> 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.