Table of Contents

Interface IMultiplexedStream

Namespace
IceRpc.Transports
Assembly
IceRpc.dll

A multiplexed stream enables byte data exchange over a multiplexed transport.

public interface IMultiplexedStream : IDuplexPipe
Inherited Members

Remarks

The implementation of Output must be a ReadOnlySequencePipeWriter and this pipe writer must support reporting its count of unflushed bytes.

Properties

Id

Gets the stream ID.

ulong Id { get; }

Property Value

ulong

The stream ID.

Remarks

The stream IDs have the same format as the QUIC stream IDs https://datatracker.ietf.org/doc/html/rfc9000#name-stream-types-and-identifier.

Exceptions

InvalidOperationException

Thrown if the stream is not started. Local streams are not started until data is written. A remote stream is always started.

IsBidirectional

Gets a value indicating whether the stream is bidirectional.

bool IsBidirectional { get; }

Property Value

bool

true if the stream is a bidirectional stream; otherwise, false.

IsRemote

Gets a value indicating whether the stream is remote. A remote stream is a stream initiated by the peer and it's returned by AcceptStreamAsync(CancellationToken).

bool IsRemote { get; }

Property Value

bool

true if the stream is a remote stream; otherwise, false.

IsStarted

Gets a value indicating whether the stream is started.

bool IsStarted { get; }

Property Value

bool

true if the stream is started; otherwise, false.

Remarks

Remote streams are always started after construction. A local stream is started by the first write.

WritesClosed

Gets a task that completes when all write network activity ceases for this stream. This occurs when:

<ul><li><xref href="System.IO.Pipelines.PipeWriter.Complete(System.Exception)" data-throw-if-not-resolved="false"></xref> is called on this stream's <xref href="System.IO.Pipelines.IDuplexPipe.Output" data-throw-if-not-resolved="false"></xref>.</li><li>the peer calls <xref href="System.IO.Pipelines.PipeReader.Complete(System.Exception)" data-throw-if-not-resolved="false"></xref> on the stream's <xref href="System.IO.Pipelines.IDuplexPipe.Input" data-throw-if-not-resolved="false"></xref>.</li><li>the implementation detects a network failure that prevents further writes on the underlying
network stream.</li></ul>

The task is never faulted or canceled.

Task WritesClosed { get; }

Property Value

Task

The writes closed task.