Re: [akka-user] tcp client server recommendations

2015-02-01 Thread Jeremy Stone
Would something like the following in the server handler do it for you?... def silentSource = ??? // Source that emits nothing but does never completes def handleDataFromClient: ByteString => Unit = ??? ForeachSink[StreamTcp.IncomingConnection] { conn => println("Client connec

Re: [akka-user] Creating custom source materializations

2015-01-30 Thread Jeremy Stone
Excellent, Björn. Thanks for that. For what it's worth, I have created a source implementation using KeyedActorSource - a very simple silent, non completing but cancellable source so that we can keep TCP streams open without writing to them until we're done. (For the moment I have put it in a p

[akka-user] Creating custom source materializations

2015-01-22 Thread Jeremy Stone
Is there any way at the moment to create custom sources with specific custom materializations? Essentially we want to be able to create custom flexible scheduling Sources (similar to TickSource) that materialize to Cancellable so that we can stop them. I can see how to create an ActorPublisher

Re: [akka-user] Shutting down akka streams flows

2014-12-20 Thread Jeremy Stone
Martynas, No. I hadn't seen that. That makes sense and provides flexibility: cancellation being specific to Sources (or Sinks, I suppose?) that materialize to Cancellable (or something providing an equivalent facility). This probably caters for many sources for output data we will use (usually

[akka-user] Shutting down akka streams flows

2014-12-19 Thread Jeremy Stone
complete when one of its input branches does.) Any advice/pointers would be greatly appreciated. Thanks, Jeremy Stone object SourceUtils { def cancellable[T](source: Source[T])(implicit system: ActorSystem): (Source[T], Cancellable) = { val (inf, cancellable) = cancellableInfiniteSource