Table of Contents

Class MultiplexingStream.ChannelOptions

Namespace
Nerdbank.Streams
Assembly
Nerdbank.Streams.dll

Describes local treatment of a channel.

public class MultiplexingStream.ChannelOptions
Inheritance
MultiplexingStream.ChannelOptions
Inherited Members

Constructors

ChannelOptions()

Initializes a new instance of the MultiplexingStream.ChannelOptions class.

public ChannelOptions()

Properties

ChannelReceivingWindowSize

Gets or sets the number of received bytes that may be buffered locally per channel (transmitted from the remote party but not yet processed).

public long? ChannelReceivingWindowSize { get; set; }

Property Value

long?

Remarks

This value should be at least the value of DefaultChannelReceivingWindowSize when the MultiplexingStream was created. When the value is null or less than DefaultChannelReceivingWindowSize, the value from DefaultChannelReceivingWindowSize is used.

ExistingPipe

Gets or sets an existing IDuplexPipe instance used to exchange data with the channel.

public IDuplexPipe? ExistingPipe { get; set; }

Property Value

IDuplexPipe

The default is null.

Remarks

This property supports high throughput scenarios where channel data ultimately goes to a PipeWriter and PipeReader that already exist. This may remove the need for a memory copy of all bytes transferred over the channel by directing the MultiplexingStream to read and write directly an existing reader/writer pair. When set, the Input and Output properties will throw NotSupportedException since their values are implementation details of the existing pipe set here.

The PipeWriter specified in Output *must* be created with PauseWriterThreshold that *exceeds* the value of ChannelReceivingWindowSize and DefaultChannelReceivingWindowSize.

Exceptions

ArgumentException

Thrown if set to an IDuplexPipe that returns null for either of its properties.

InputPipeOptions

Gets or sets the options for the Pipe created to relay local reading from this channel.

[Obsolete("This value is ignored.")]
public PipeOptions? InputPipeOptions { get; set; }

Property Value

PipeOptions

TraceSource

Gets or sets the mechanism used for tracing activity related to this channel.

public TraceSource? TraceSource { get; set; }

Property Value

TraceSource

The trace source. May be null.