Interface IMessaging
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
messagebyte[]The byte array containing the message data.
offsetintThe zero-based offset in the byte array at which to begin reading the message.
sizeintThe number of bytes to send.
SendMessage(string)
Sends a text message to the remote peer.
void SendMessage(string message)
Parameters
messagestringThe text message to send.
SendMessage(VersatileBuffer)
Sends a binary message to the remote peer using a versatile buffer.
void SendMessage(VersatileBuffer buffer)
Parameters
bufferVersatileBufferThe 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
NewMessage
Occurs when a new message from a remote peer arrives.
event EventHandler<MessageEventArgs> NewMessage