> On 27 Nov 2017, at 4:17 pm, Konrad “ktoso” Malawski 
> <[email protected]> wrote:
> 
> What kind of Flow exactly. What does it do?
I’m implementing Unix Domain Sockets and the following interface borrowed from 
Tcp:
def outgoingConnection(
  remoteAddress: UnixSocketAddress,
  localAddress: Option[UnixSocketAddress] = None,
  connectTimeout: Duration = Duration.Inf): Flow[ByteString, ByteString, 
Future[OutgoingConnection]]
If I connect thus:
Source.single(bytes)
  .via(UnixDomainSocket().outgoingConnection(file))
  .runWith(Sink.head)
…then the stream completes given that Source.single is completed. Changing 
Source.single to Source.repeat as a test keeps the stream open of course, and 
the socket connection works nicely.

I notice that the Tcp implementation has a custom stage and uses setKeepGoing. 
I was just wondering if there was a way to avoid my own custom stage. I’m 
currently thinking that there isn’t, but I just wanted to check in the spirit 
of writing less code.

> See this too 
> https://doc.akka.io/docs/akka/current/stream/stream-error.html?language=scala#delayed-restarts-with-a-backoff-stage
>  
> <https://doc.akka.io/docs/akka/current/stream/stream-error.html?language=scala#delayed-restarts-with-a-backoff-stage>
>  other than supervision which isn’t generic.
> 
I think I might be able to use that, but it’d be a move away from the Tcp API 
that I’m attempting to preserve. My goal is for UnixDomainSocket to be a 
drop-in replacement for Tcp.

Cheers,
-C

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