Compartir a través de


MediaProvider.BeginSendMessage Method

Begins the asynchronous operation to send a message on a specific CallDialogContext.

Namespace:  Microsoft.Rtc.Collaboration.ComponentModel
Assembly:  Microsoft.Rtc.Collaboration (in Microsoft.Rtc.Collaboration.dll)

Syntax

'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
'Usage
Dim signalingContext As CallDialogContext
Dim messageType As MessageType
Dim message As ContentDescription
Dim messageHeaders As IEnumerable(Of SignalingHeader)
Dim userCallback As AsyncCallback
Dim state As Object
Dim returnValue As IAsyncResult

returnValue = Me.BeginSendMessage(signalingContext, _
    messageType, message, messageHeaders, _
    userCallback, state)
protected IAsyncResult BeginSendMessage(
    CallDialogContext signalingContext,
    MessageType messageType,
    ContentDescription message,
    IEnumerable<SignalingHeader> messageHeaders,
    AsyncCallback userCallback,
    Object state
)

Parameters

  • 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

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.

ArgumentNullException

Thrown when signalingContext is null.

See Also

Reference

MediaProvider Class

MediaProvider Members

Microsoft.Rtc.Collaboration.ComponentModel Namespace