Class ProtobufEncodeOptions
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
intThe minimum segment size for the constructor of PipeOptions.
streamFlushThreshold
intThe 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
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
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; }