BeginSendMessage Method

Sends a message to the specified remote participant.

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

Syntax

'Declaration
Protected Function BeginSendMessage ( _
    messageType As MessageType, _
    contentType As ContentType, _
    body As Byte(), _
    signalingHeaders As IEnumerable(Of SignalingHeader), _
    userCallback As AsyncCallback, _
    state As Object _
) As IAsyncResult
'Usage
Dim messageType As MessageType
Dim contentType As ContentType
Dim body As Byte()
Dim signalingHeaders As IEnumerable(Of SignalingHeader)
Dim userCallback As AsyncCallback
Dim state As Object
Dim returnValue As IAsyncResult

returnValue = Me.BeginSendMessage(messageType, _
    contentType, body, signalingHeaders, _
    userCallback, state)
protected IAsyncResult BeginSendMessage(
    MessageType messageType,
    ContentType contentType,
    byte[] body,
    IEnumerable<SignalingHeader> signalingHeaders,
    AsyncCallback userCallback,
    Object state
)

Parameters

  • contentType
    Type: System.Net.Mime..::..ContentType
    Content type describing the body. Can be nullNothingnullptrunita null reference (Nothing in Visual Basic) if the body is nullNothingnullptrunita null reference (Nothing in Visual Basic).
  • body
    Type: array<System..::..Byte>[]()[][]
    The body for the data. Can be nullNothingnullptrunita null reference (Nothing in Visual Basic).

Return Value

Type: System..::..IAsyncResult
Returns an [IAsyncResult] that references this operation.

Exceptions

Exception Condition
ArgumentException

Thrown when a body is specified without a content type with media type. MessageType is not Message or Info.

InvalidOperationException

Thrown when called in an invalid state.

ServerPolicyException

Thrown when a server policy setting does not allow the sending of the message.

See Also

Reference

Call Class

Call Members

Microsoft.Rtc.Collaboration Namespace