Sorry I know this is rather silly question, but I have to jump to Akka 
streams before I completely understand everything, because I need its TLS 
support to do async IO, to implement an async Thrift client.

val sslContext = ...
val tls = SslTls(sslContext, NegotiateNewSession(None, None, None, None), 
Client)
val transport = Tcp()(system).outgoingConnection(ip, port)
val flow = tls.join(transport)
Source(ActorPublisher[SslTlsOutbound](writer)).via(flow).runWith(Sink(
ActorSubscriber[SslTlsInbound](reader)))

reader and writer are two actors: reader gets ByteString and translates to 
Thrift responses and deliver them to application; write translates Thrift 
requests to ByteString and send out. 

It seems to work well. But how to make it stop, being sure the TCP connection 
has been closed?


Thanks for your help!

-- 
>>>>>>>>>>      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