AudioVideoCall.BeginSendMessage Method (MessageType, ContentDescription, CallSendMessageRequestOptions, AsyncCallback, Object)
Initiates an operation to send message to the remote participant of this call.
Namespace: Microsoft.Rtc.Collaboration.AudioVideo
Assembly: Microsoft.Rtc.Collaboration (in Microsoft.Rtc.Collaboration.dll)
Syntax
'Declaration
Public Function BeginSendMessage ( _
messageType As MessageType, _
contentDescription As ContentDescription, _
options As CallSendMessageRequestOptions, _
userCallback As AsyncCallback, _
state As Object _
) As IAsyncResult
'Usage
Dim instance As AudioVideoCall
Dim messageType As MessageType
Dim contentDescription As ContentDescription
Dim options As CallSendMessageRequestOptions
Dim userCallback As AsyncCallback
Dim state As Object
Dim returnValue As IAsyncResult
returnValue = instance.BeginSendMessage(messageType, _
contentDescription, options, userCallback, _
state)
public IAsyncResult BeginSendMessage(
MessageType messageType,
ContentDescription contentDescription,
CallSendMessageRequestOptions options,
AsyncCallback userCallback,
Object state
)
Parameters
- messageType
Type: Microsoft.Rtc.Signaling.MessageType
Message type to send.
- contentDescription
Type: Microsoft.Rtc.Signaling.ContentDescription
Content description to send.
- options
Type: Microsoft.Rtc.Collaboration.CallSendMessageRequestOptions
Optional parameters to send in the 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 other asynchronous operations.
Return Value
Type: System.IAsyncResult
An IAsyncResult that references the asynchronous operation.
Exceptions
Exception | Condition |
---|---|
ArgumentException | |
ArgumentException | Thrown when the content description in parameter contentDescription is invalid. |
ArgumentException | Thrown when the options parameter contains invalid or restricted signaling headers. |
InvalidOperationException | Thrown when the call is in an invalid state to perform this operation. |