Sends a session message on the Call.
Namespace:
Microsoft.Rtc.Collaboration.ComponentModel
Assembly: Microsoft.Rtc.Collaboration(in Microsoft.Rtc.Collaboration.dll)
Syntax
Visual Basic (Declaration) |
---|
Protected Function BeginSendMessage ( _ signalingContext As CallDialogContext, _ messageType As MessageType, _ message As ContentDescription, _ messageHeaders As IEnumerable( Of SignalingHeader), _ userCallback As AsyncCallback, _ state As Object _ ) As IAsyncResult |
C# |
---|
protected IAsyncResult BeginSendMessage( CallDialogContext signalingContext, MessageType messageType, ContentDescription message, IEnumerable< SignalingHeader> messageHeaders, AsyncCallback userCallback, Object state ) |
Visual C++ |
---|
protected: IAsyncResult^ BeginSendMessage( CallDialogContext^ signalingContext, MessageType messageType, ContentDescription^ message, IEnumerable< SignalingHeader^>^ messageHeaders, AsyncCallback^ userCallback, Object^ state ) |
JavaScript |
---|
function beginSendMessage( signalingContext, messageType, message, messageHeaders, userCallback, state); |
Parameters
- signalingContext
- Type:
Microsoft.Rtc.Collaboration
.
.
::
.
CallDialogContext
The signaling context for the session to send the message.
- messageType
- Type:
Microsoft.Rtc.Signaling
.
.
::
.
MessageType
The type of message to send.
- message
- Type:
Microsoft.Rtc.Signaling
.
.
::
.
ContentDescription
The actual message, consisting of its contentType and message body.
- messageHeaders
- Type:
IEnumerable
<
(Of
<
(
SignalingHeader
>
)
>
)
Additional headers to be sent with the message.
- userCallback
- Type:
AsyncCallback
The method to be called when the asynchronous operation is completed.
- state
- Type:
Object
A user-provided object that distinguishes this particular asynchronous operation from other asynchronous operations.
Return Value
An IAsyncResult that references the asynchronous operation.Exceptions
Exception | Condition |
---|---|
ArgumentException |
Thrown when a body is specified without a content type with media type. Thrown if messageType is other than Message, Info or Options |
InvalidOperationException | Thrown when the call is in an invalid state. |
Microsoft.Rtc.Signaling . . :: . ServerPolicyException | Thrown when a server policy setting does not allow the sending of the message. |
ArgumentNullException | Thrown when signalingContextis null. |