Click or drag to resize
Akka.NETFramingSimpleFramingProtocol Method
Returns a BidiFlow that implements a simple framing protocol. This is a convenience wrapper over LengthField(Int32, Int32, Int32, ByteOrder) and simply attaches a length field header of four bytes (using big endian encoding) to outgoing messages, and decodes such messages in the inbound direction. The decoded messages do not contain the header. This BidiFlow is useful if a simple message framing protocol is needed (for example when TCP is used to send individual messages) but no compatibility with existing protocols is necessary. The encoded frames have the layout {{{ [4 bytes length field, Big Endian][User Payload] }}} The length field encodes the length of the user payload excluding the header itself.

Namespace:  Akka.Streams.Dsl
Assembly:  Akka.Streams (in Akka.Streams.dll) Version: 1.2.3.42 (1.2.3.42)
Syntax
public static BidiFlow<ByteString, ByteString, ByteString, ByteString, NotUsed> SimpleFramingProtocol(
	int maximumMessageLength
)

Parameters

maximumMessageLength
Type: SystemInt32
Maximum length of allowed messages. If sent or received messages exceed the configured limit this BidiFlow will fail the stream. The header attached by this BidiFlow are not included in this limit.

Return Value

Type: BidiFlowByteString, ByteString, ByteString, ByteString, NotUsed
TBD
See Also