Table of Contents

Class ProtobufEncodeOptions

Namespace
IceRpc.Protobuf
Assembly
IceRpc.Protobuf.dll

Represents a property bag used to configure the encoding of payloads.

public sealed class ProtobufEncodeOptions
Inheritance
ProtobufEncodeOptions
Inherited Members

Constructors

ProtobufEncodeOptions(MemoryPool<byte>?, int, int)

Constructs a new instance.

public ProtobufEncodeOptions(MemoryPool<byte>? pool = null, int minimumSegmentSize = -1, int streamFlushThreshold = -1)

Parameters

pool MemoryPool<byte>

The pool parameter for the constructor of PipeOptions.

minimumSegmentSize int

The minimum segment size for the constructor of PipeOptions.

streamFlushThreshold int

The value of StreamFlushThreshold. The default value (-1) is equivalent to 16 KB.

Properties

Default

Gets the default instance of ProtobufEncodeOptions.

public static ProtobufEncodeOptions Default { get; }

Property Value

ProtobufEncodeOptions

PipeOptions

Gets the pipe options that the IceRPC + Protobuf uses when creating pipes. The IceRPC + Protobuf integration creates a pipe when encoding a request or response payload, and when encoding an async enumerable into a PipeReader.

public PipeOptions PipeOptions { get; }

Property Value

PipeOptions

StreamFlushThreshold

Gets the stream flush threshold. When encoding a Protobuf stream (async enumerable), the IceRpc + Protobuf encodes the values provided by the source async enumerable into a pipe writer. The IceRpc + Protobuf integration flushes this pipe writer when no new value is available synchronously, or when it has written StreamFlushThreshold bytes to this pipe writer.

public int StreamFlushThreshold { get; }

Property Value

int