Skip to content

Interface IMessageStreamBase

Namespace: Void.Proxy.Api.Network.Streams
Assembly: Void.Proxy.Api.dll

Defines lifecycle and flushing operations shared by proxy message streams.

public interface IMessageStreamBase : IDisposable, IAsyncDisposable

Implements

IDisposable, IAsyncDisposable

Properties

CanRead

Gets whether the stream currently supports reading.

bool CanRead { get; }

Property Value

bool

CanWrite

Gets whether the stream currently supports writing.

bool CanWrite { get; }

Property Value

bool

IsAlive

Gets whether the stream remains open and usable.

bool IsAlive { get; }

Property Value

bool

Methods

Close()

Closes the stream and prevents further I/O.

void Close()

Flush()

Flushes buffered output to the underlying stream.

void Flush()

FlushAsync(CancellationToken)

Asynchronously flushes buffered output to the underlying stream.

ValueTask FlushAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A token used to cancel the flush.

Returns

ValueTask

A task that completes when buffered output has been flushed.