Interface IRfbMessageSender
Describes a background thread that sends queued messages and provides methods to add messages to the send queue.
Inherited Members
Namespace: MarcusW.VncClient.Protocol.Services
Assembly: MarcusW.VncClient.dll
Syntax
public interface IRfbMessageSender : IBackgroundThread, IDisposable
Methods
| Improve this Doc View SourceEnqueueInitialMessages(CancellationToken)
Enqueues some initial messages to get things rolling.
Declaration
void EnqueueInitialMessages(CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | The cancellation token. |
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.
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.
SendMessageAndWaitAsync<TMessageType>(IOutgoingMessage<TMessageType>, CancellationToken)
Adds the message
to the send queue and returns a
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.
StartSendLoop()
Starts the send loop.
Declaration
void StartSendLoop()
StopSendLoopAsync()
Stops the send loop and waits for completion.
Declaration
Task StopSendLoopAsync()
Returns
Type | Description |
---|---|
Task |