Table of Contents

Class BinaryEnvelopeCodec

Namespace
AnyProtocol
Assembly
AnyProtocol.dll

Provides the binary envelope codec implementation used by AnyProtocol applications.

public sealed class BinaryEnvelopeCodec : IEnvelopeCodec, IMessageEncoder, IMessageDecoder
Inheritance
BinaryEnvelopeCodec
Implements
Inherited Members

Constructors

BinaryEnvelopeCodec(EnvelopeCodecLimits?)

Initializes a new instance of the BinaryEnvelopeCodec class.

public BinaryEnvelopeCodec(EnvelopeCodecLimits? limits = null)

Parameters

limits EnvelopeCodecLimits

The limits applied while encoding and decoding.

Methods

Decode(ReadOnlyMemory<byte>)

Decodes from transport data.

public TransportEnvelope Decode(ReadOnlyMemory<byte> frame)

Parameters

frame ReadOnlyMemory<byte>

The frame to process.

Returns

TransportEnvelope

The result of the decode operation.

Encode(TransportEnvelope)

Encodes for transport.

public ReadOnlyMemory<byte> Encode(TransportEnvelope envelope)

Parameters

envelope TransportEnvelope

The transport envelope to process.

Returns

ReadOnlyMemory<byte>

The result of the encode operation.