Table of Contents

Interface IMessaging

Namespace
VAST.Network
Assembly
VAST.Common.dll

Defines the contract for messaging functionality that enables communication with remote peers.

public interface IMessaging

Properties

IsMessagingSupported

Gets a value indicating whether the remote peer supports messaging.

bool? IsMessagingSupported { get; }

Property Value

bool?

Remarks

If the value is null, it has not yet been determined whether the remote peer supports messaging.

Methods

SendMessage(byte[], int, int)

Sends a binary message to the remote peer.

void SendMessage(byte[] message, int offset, int size)

Parameters

message byte[]

The byte array containing the message data.

offset int

The zero-based offset in the byte array at which to begin reading the message.

size int

The number of bytes to send.

SendMessage(string)

Sends a text message to the remote peer.

void SendMessage(string message)

Parameters

message string

The text message to send.

SendMessage(VersatileBuffer)

Sends a binary message to the remote peer using a versatile buffer.

void SendMessage(VersatileBuffer buffer)

Parameters

buffer VersatileBuffer

The buffer containing the message data to send.

Events

MessagingSupportDetermined

Occurs when it has been determined whether the remote peer supports messaging.

event EventHandler<bool> MessagingSupportDetermined

Event Type

EventHandler<bool>

NewMessage

Occurs when a new message from a remote peer arrives.

event EventHandler<MessageEventArgs> NewMessage

Event Type

EventHandler<MessageEventArgs>