RealTimeEndpoint.BeginSendMessage Method (MessageType, RealTimeAddress, SendMessageOptions, AsyncCallback, Object)
Sends a message.
Namespace: Microsoft.Rtc.Signaling
Assembly: Microsoft.Rtc.Collaboration (in Microsoft.Rtc.Collaboration.dll)
Syntax
'Declaration
Public Function BeginSendMessage ( _
messageType As MessageType, _
sessionTarget As RealTimeAddress, _
options As SendMessageOptions, _
userCallback As AsyncCallback, _
state As Object _
) As IAsyncResult
'Usage
Dim instance As RealTimeEndpoint
Dim messageType As MessageType
Dim sessionTarget As RealTimeAddress
Dim options As SendMessageOptions
Dim userCallback As AsyncCallback
Dim state As Object
Dim returnValue As IAsyncResult
returnValue = instance.BeginSendMessage(messageType, _
sessionTarget, options, userCallback, _
state)
public IAsyncResult BeginSendMessage(
MessageType messageType,
RealTimeAddress sessionTarget,
SendMessageOptions options,
AsyncCallback userCallback,
Object state
)
Parameters
- messageType
Type: Microsoft.Rtc.Signaling.MessageType
The message type.
- sessionTarget
Type: Microsoft.Rtc.Signaling.RealTimeAddress
Target to send the message.
- options
Type: Microsoft.Rtc.Signaling.SendMessageOptions
Options to customize the behavior of send message.
- userCallback
Type: System.AsyncCallback
The method to be called when the asynchronous operation is completed.
- state
Type: System.Object
A user-provided object that distinguishes this particular asynchronous operation from others.
Return Value
Type: System.IAsyncResult
An IAsyncResult that references the asynchronous operation.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | Thrown when null is supplied for a required argument. The argument name which is required is is part of the exception message. |
ArgumentException | Thrown if one of the SignalingHeader in signalingHeaders collection have null or restricted header. |