WebSocketMessageHandler Class

Definition

A message handler for the JsonRpc class that uses WebSocket as the transport.

public class WebSocketMessageHandler : StreamJsonRpc.DelimitedMessageHandler
public class WebSocketMessageHandler : StreamJsonRpc.MessageHandlerBase
public class WebSocketMessageHandler : StreamJsonRpc.MessageHandlerBase, StreamJsonRpc.Reflection.IJsonRpcMessageBufferManager
type WebSocketMessageHandler = class
    inherit DelimitedMessageHandler
type WebSocketMessageHandler = class
    inherit MessageHandlerBase
type WebSocketMessageHandler = class
    inherit MessageHandlerBase
    interface IJsonRpcMessageBufferManager
Public Class WebSocketMessageHandler
Inherits DelimitedMessageHandler
Public Class WebSocketMessageHandler
Inherits MessageHandlerBase
Public Class WebSocketMessageHandler
Inherits MessageHandlerBase
Implements IJsonRpcMessageBufferManager
Inheritance
WebSocketMessageHandler
Inheritance
WebSocketMessageHandler
Implements

Constructors

WebSocketMessageHandler(WebSocket)

Initializes a new instance of the WebSocketMessageHandler class that uses the JsonMessageFormatter to serialize messages as textual JSON.

WebSocketMessageHandler(WebSocket, IJsonRpcMessageFormatter, Int32)

Initializes a new instance of the WebSocketMessageHandler class.

WebSocketMessageHandler(WebSocket, Int32)

Initializes a new instance of the WebSocketMessageHandler class.

Properties

CanRead

Gets a value indicating whether this message handler can receive messages.

CanRead

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

(Inherited from DelimitedMessageHandler)
CanWrite

Gets a value indicating whether this message handler can send messages.

CanWrite

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

(Inherited from DelimitedMessageHandler)
DisposalToken

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

(Inherited from DelimitedMessageHandler)
DisposalToken

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

(Inherited from MessageHandlerBase)
Encoding

Gets or sets the encoding to use for transmitted messages.

(Inherited from DelimitedMessageHandler)
Formatter

Gets the formatter used for message serialization.

(Inherited from MessageHandlerBase)
ReceivingStream

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

(Inherited from DelimitedMessageHandler)
SendingStream

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

(Inherited from DelimitedMessageHandler)
WebSocket

Gets the WebSocket used to communicate.

Methods

Dispose()

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

(Inherited from DelimitedMessageHandler)
Dispose()
Obsolete.

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

(Inherited from MessageHandlerBase)
Dispose(Boolean)

Disposes resources allocated by this instance.

(Inherited from DelimitedMessageHandler)
Dispose(Boolean)

Disposes resources allocated by this instance that are common to both reading and writing.

(Inherited from MessageHandlerBase)
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)

Ensures that all messages transmitted up to this point are en route to their destination, rather than sitting in some local buffer.

FlushCoreAsync()

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

(Inherited from DelimitedMessageHandler)
ReadAsync(CancellationToken)

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

(Inherited from DelimitedMessageHandler)
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.

WriteAsync(JsonRpcMessage, CancellationToken)

Writes a message to the transport and flushes.

(Inherited from MessageHandlerBase)
WriteAsync(String, CancellationToken)

Writes a message to the stream.

(Inherited from DelimitedMessageHandler)
WriteCoreAsync(JsonRpcMessage, CancellationToken)

Writes a message.

WriteCoreAsync(String, Encoding, CancellationToken)

Writes a message to the stream.

Explicit Interface Implementations

IDisposableObservable.IsDisposed (Inherited from DelimitedMessageHandler)
IDisposableObservable.IsDisposed

Gets a value indicating whether this instance has been disposed.

(Inherited from MessageHandlerBase)
IJsonRpcMessageBufferManager.DeserializationComplete(JsonRpcMessage)

Notifies that it is safe to free buffers held to deserialize the payload for a message because all deserialization attempts are completed.

Applies to