Although I have not done this yet, I would assume you can do this with a 
PushPullStage that pushes in onPull. How the state gets there to know when 
to push in onPull is probably an implementation detail.

On Monday, June 29, 2015 at 5:15:53 AM UTC-5, Chad Selph wrote:
>
> I'm currently rewriting a library I have that previously used akka IO 
> pipelines. Reading through the examples of streaming IO with akka-stream 
> and akka-http, I've only seen examples with request -> response type 
> protocols.
>
> Currently, I have a BidiFlow that serializes/deserializes between 
> ByteStrings and case classes, but I only know how to make this work in one 
> direction (client makes request, server replies to request). In this 
> protocol, the server can also initiate requests to the client.
>
> How can I "inject" a message into the BidiFlow that isn't just a response 
> to a client request? I understand at a high level the solution is probably 
> to make a Graph with another Source pointing to my serializer, but I've had 
> a tough time wrapping my head around the graph DSL. If someone could point 
> me to an example of something similar, I'd very much appreciate it.
>

-- 
>>>>>>>>>>      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 http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to