Show / Hide Table of Contents

Interface IRfbMessageSender

Describes a background thread that sends queued messages and provides methods to add messages to the send queue.

Inherited Members
IBackgroundThread.Failed
Namespace: MarcusW.VncClient.Protocol.Services
Assembly: MarcusW.VncClient.dll
Syntax
public interface IRfbMessageSender : IBackgroundThread, IDisposable

Methods

| Improve this Doc View Source

EnqueueInitialMessages(CancellationToken)

Enqueues some initial messages to get things rolling.

Declaration
void EnqueueInitialMessages(CancellationToken cancellationToken = null)
Parameters
Type Name Description
CancellationToken cancellationToken

The cancellation token.

| Improve this Doc View Source

EnqueueMessage<TMessageType>(IOutgoingMessage<TMessageType>, CancellationToken)

Adds the message to the send queue and returns without waiting for it being sent.

Declaration
void EnqueueMessage<TMessageType>(IOutgoingMessage<TMessageType> message, CancellationToken cancellationToken = null)
    where TMessageType : class, IOutgoingMessageType
Parameters
Type Name Description
IOutgoingMessage<TMessageType> message

The message to send.

CancellationToken cancellationToken

The cancellation token.

Type Parameters
Name Description
TMessageType

The type of the message.

Remarks

Please ensure the outgoing message type is marked as being supported by both sides before sending it. See UsedMessageTypes.

| Improve this Doc View Source

SendMessageAndWait<TMessageType>(IOutgoingMessage<TMessageType>, CancellationToken)

Adds the message to the send queue and waits synchronously for the message being sent.

Declaration
void SendMessageAndWait<TMessageType>(IOutgoingMessage<TMessageType> message, CancellationToken cancellationToken = null)
    where TMessageType : class, IOutgoingMessageType
Parameters
Type Name Description
IOutgoingMessage<TMessageType> message

The message to send.

CancellationToken cancellationToken

The cancellation token.

Type Parameters
Name Description
TMessageType

The type of the message.

Remarks

Please ensure the outgoing message type is marked as being supported by both sides before sending it. See UsedMessageTypes.

| Improve this Doc View Source

SendMessageAndWaitAsync<TMessageType>(IOutgoingMessage<TMessageType>, CancellationToken)

Adds the message to the send queue and returns a that completes when the message was sent.

Declaration
Task SendMessageAndWaitAsync<TMessageType>(IOutgoingMessage<TMessageType> message, CancellationToken cancellationToken = null)
    where TMessageType : class, IOutgoingMessageType
Parameters
Type Name Description
IOutgoingMessage<TMessageType> message

The message to send.

CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
Task
Type Parameters
Name Description
TMessageType

The type of the message.

Remarks

Please ensure the outgoing message type is marked as being supported by both sides before sending it. See UsedMessageTypes.

| Improve this Doc View Source

StartSendLoop()

Starts the send loop.

Declaration
void StartSendLoop()
| Improve this Doc View Source

StopSendLoopAsync()

Stops the send loop and waits for completion.

Declaration
Task StopSendLoopAsync()
Returns
Type Description
Task
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX