Flow.fromSinkAndSource

Creates a Flow from a Sink and a Source where the Flow’s input will be sent to the Sink and the Flow ’s output will come from the Source.

Flow operators composed of Sinks and Sources

Signature

def fromSinkAndSource[I, O](sink: Graph[SinkShape[I], _], source: Graph[SourceShape[O], _]): Flow[I, O, NotUsed]
def fromSinkAndSourceMat[I, O, M1, M2, M](sink: Graph[SinkShape[I], M1], source: Graph[SourceShape[O], M2])(combine: (M1, M2) => M): Flow[I, O, M]

Description

Creates a Flow from a Sink and a Source where the Flow’s input will be sent to the Sink and the Flow ’s output will come from the Source.

Note that termination events, like completion and cancelation is not automatically propagated through to the “other-side” of the such-composed Flow. Use Flow.fromSinkAndSourceCoupled if you want to couple termination of both of the ends, for example most useful in handling websocket connections.

Found an error in this documentation? The source code for this page can be found here. Please feel free to edit and contribute a pull request.