| FramingDelimiter Method |
Creates a Flow that handles decoding a stream of unstructured byte chunks into a stream of frames where the
incoming chunk stream uses a specific byte-sequence to mark frame boundaries.
The decoded frames will not include the separator sequence.
If there are buffered bytes (an incomplete frame) when the input stream finishes and allowTruncation is set to
false then this Flow will fail the stream reporting a truncated frame.
Namespace:
Akka.Streams.Dsl
Assembly:
Akka.Streams (in Akka.Streams.dll) Version: 1.2.3.42 (1.2.3.42)
Syntax public static Flow<ByteString, ByteString, NotUsed> Delimiter(
ByteString delimiter,
int maximumFrameLength,
bool allowTruncation = false
)
static member Delimiter :
delimiter : ByteString *
maximumFrameLength : int *
?allowTruncation : bool
(* Defaults:
let _allowTruncation = defaultArg allowTruncation false
*)
-> Flow<ByteString, ByteString, NotUsed>
Parameters
- delimiter
- Type: Akka.IOByteString
The byte sequence to be treated as the end of the frame. - maximumFrameLength
- Type: SystemInt32
The maximum length of allowed frames while decoding. If the maximum length is exceeded this Flow will fail the stream. - allowTruncation (Optional)
- Type: SystemBoolean
If false, then when the last frame being decoded contains no valid delimiter this Flow fails the stream instead of returning a truncated frame.
Return Value
Type:
FlowByteString,
ByteString,
NotUsedTBD
See Also