StreamMessageHandler Class

Definition

An abstract base class for for sending and receiving messages over a reading and writing pair of Stream objects.

public abstract class StreamMessageHandler : StreamJsonRpc.MessageHandlerBase
type StreamMessageHandler = class
    inherit MessageHandlerBase
Public MustInherit Class StreamMessageHandler
Inherits MessageHandlerBase
Inheritance
StreamMessageHandler

Constructors

StreamMessageHandler(Stream, Stream, IJsonRpcMessageFormatter)

Initializes a new instance of the StreamMessageHandler class.

Properties

CanRead

Gets a value indicating whether this message handler has a receiving stream.

CanWrite

Gets a value indicating whether this message handler has a sending stream.

DisposalToken

Gets a token that is canceled when this instance is disposed.

(Inherited from MessageHandlerBase)
Formatter

Gets the formatter used for message serialization.

(Inherited from MessageHandlerBase)
ReceivingStream

Gets the stream used to receive messages. May be null.

SendingStream

Gets the stream used to transmit messages. May be null.

Methods

Dispose()
Obsolete.

Disposes this instance, and cancels any pending read or write operations.

(Inherited from MessageHandlerBase)
Dispose(Boolean)

Disposes resources allocated by this instance.

DisposeAsync()

Disposes this instance, and cancels any pending read or write operations.

(Inherited from MessageHandlerBase)
DisposeReader()

Disposes resources allocated by this instance that are used for reading (not writing).

(Inherited from MessageHandlerBase)
DisposeWriter()

Disposes resources allocated by this instance that are used for writing (not reading).

(Inherited from MessageHandlerBase)
FlushAsync(CancellationToken)

Calls FlushAsync() on the SendingStream, or equivalent sending stream if using an alternate transport.

ReadAsync(CancellationToken)

Reads a distinct and complete message from the transport, waiting for one if necessary.

(Inherited from MessageHandlerBase)
ReadCoreAsync(CancellationToken)

Reads a distinct and complete message, waiting for one if necessary.

(Inherited from MessageHandlerBase)
WriteAsync(JsonRpcMessage, CancellationToken)

Writes a message to the transport and flushes.

(Inherited from MessageHandlerBase)
WriteCoreAsync(JsonRpcMessage, CancellationToken)

Writes a message.

(Inherited from MessageHandlerBase)

Explicit Interface Implementations

IDisposableObservable.IsDisposed

Gets a value indicating whether this instance has been disposed.

(Inherited from MessageHandlerBase)

Applies to