I experimented a bit more and found two possible solutions:

conn.flow.concat(Source.empty).to(Sink.cancelled)


and

ctx.pushAndFinish(elem)


which both *seem* to do the same thing. Not sure whether I should prefer 
one over the other, though, or if there is a better way to do this.

Best,
Olaf


Am Freitag, 29. Mai 2015 19:12:42 UTC+2 schrieb Olaf Bergner:
>
> I'm currently experimenting with implementing a custom TCP protocol 
> server. A requirement I have is being able to close a client connection 
> under certain circumstances. The akka streams doc say
>
> Closing connections is possible by cancelling the *incoming connection* 
>> Flow from your server logic (e.g. by connecting its downstream to an 
>> CancelledSink and its upstream to a *completed* Source). It is also 
>> possible to shut down the servers socket by cancelling the 
>> connections:Source[IncomingConnection].
>
>
> However, I have been unable to figure out how to actually do this. Could 
> someone please help out?
>
> Best,
> Olaf 
>

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