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
limitsEnvelopeCodecLimitsThe limits applied while encoding and decoding.
Methods
Decode(ReadOnlyMemory<byte>)
Decodes from transport data.
public TransportEnvelope Decode(ReadOnlyMemory<byte> frame)
Parameters
frameReadOnlyMemory<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
envelopeTransportEnvelopeThe transport envelope to process.
Returns
- ReadOnlyMemory<byte>
The result of the encode operation.