In play framework we can see websocket-chat application that shows us usage of Concurrent.broadcast to handle websocket messages.
But I want to use websockets to send messages to each connected websocket independently. Simpliest example is something like private messages, when user sends message like: {user: "First", to: "Second", message: "Hi"}.
I looked at object play.api.libs.iteratee.Concurrent, looks like most suitable there is Concurrent.unicast to do this. But when we have Concurrent.broadcast - we have channel where we can push messages. In case of Concurrent.unicast - we have just Enumerator.
So, how can I dispatch private messages between websockets with Play Framework 2.2 in Scala?