BeginSendMessage Method (MessageType, ContentType, Byte[], IEnumerable(SignalingHeader), AsyncCallback, Object)

Sends a message to the specified participant.

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


Public Function BeginSendMessage ( _
    messageType As MessageType, _
    contentType As ContentType, _
    body As Byte(), _
    signalingHeaders As IEnumerable(Of SignalingHeader), _
    userCallback As AsyncCallback, _
    state As Object _
) As IAsyncResult
Dim instance As SignalingSession
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 = instance.BeginSendMessage(messageType, _
    contentType, body, signalingHeaders, _
    userCallback, state)
public IAsyncResult BeginSendMessage(
    MessageType messageType,
    ContentType contentType,
    byte[] body,
    IEnumerable<SignalingHeader> signalingHeaders,
    AsyncCallback userCallback,
    Object state


  • contentType
    Type: System.Net.Mime..::..ContentType
    The content type describing the body, which 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, which can be nullNothingnullptrunita null reference (Nothing in Visual Basic).

Return Value

Type: System..::..IAsyncResult
An [IAsyncResult] that references this operation.


Exception Condition

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


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


Thrown when called in an invalid state.


Any participant who is not part of the session is ignored.

See Also


SignalingSession Class

SignalingSession Members

BeginSendMessage Overload

Microsoft.Rtc.Signaling Namespace