Sorry, I skimmed your question a little too quickly.

If you want to have a one to one with clients and actors, there is no
built in abstraction that makes it super easy, but it is possible using
Source.actorRef and Sink.actorRef. Here is an example which
is Scala but should point you in the right direction:

https://github.com/johanandren/scala-stockholm-cluster-message-broker/blob/master/src/main/scala/WebServer.scala#L69

Sink.actorRef will take an ActorRef and simply direct messages to it so getting 
incoming messages to an actor 
is easy (you can also use actorRefWithAck and be able to provide backpressure). 
Source.actorRef will however
materialize into an actorRef that when you send messages to it, it will emit 
them. The trick is to get the materialized
actorRef into the flow, and send it to your connection actor as a message. 
(Another alternative would be to send it as
a message from mapMaterializedValue if you have the actorref for your 
connection actor in scope).

I hope this helps!
--
Johan Andrén
Typesafe -  Reactive apps on the JVM
Twitter: @apnylle

> 8 feb. 2016 kl. 16:40 skrev ash.ta <[email protected]>:
> 
> thanks for a prompt response.
> client is great, but i need server side implementation. and as i see, new 
> server side docs still show the same basic request-response example. 
> 
> -- 
> >>>>>>>>>> Read the docs: http://akka.io/docs/ <http://akka.io/docs/>
> >>>>>>>>>> Check the FAQ: 
> >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html 
> >>>>>>>>>> <http://doc.akka.io/docs/akka/current/additional/faq.html>
> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user 
> >>>>>>>>>> <https://groups.google.com/group/akka-user>
> --- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "Akka User List" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/akka-user/qWw79unk_tw/unsubscribe 
> <https://groups.google.com/d/topic/akka-user/qWw79unk_tw/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to 
> [email protected] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/akka-user 
> <https://groups.google.com/group/akka-user>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
>>>>>>>>>>      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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to