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

Sends a message.

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

Syntax

'Declaration
Public Function BeginSendMessage ( _
    localIdentityUri As String, _
    messageType As MessageType, _
    sessionTarget As RealTimeAddress, _
    contentType As ContentType, _
    body As Byte(), _
    signalingHeaders As IEnumerable(Of SignalingHeader), _
    userCallback As AsyncCallback, _
    state As Object _
) As IAsyncResult
'Usage
Dim instance As SipPeerToPeerEndpoint
Dim localIdentityUri As String
Dim messageType As MessageType
Dim sessionTarget As RealTimeAddress
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(localIdentityUri, _
    messageType, sessionTarget, contentType, _
    body, signalingHeaders, userCallback, _
    state)
public IAsyncResult BeginSendMessage(
    string localIdentityUri,
    MessageType messageType,
    RealTimeAddress sessionTarget,
    ContentType contentType,
    byte[] body,
    IEnumerable<SignalingHeader> signalingHeaders,
    AsyncCallback userCallback,
    Object state
)

Parameters

  • localIdentityUri
    Type: System..::..String
    The local identify URI to use. If nullNothingnullptrunita null reference (Nothing in Visual Basic), the local endpoint's URI is used.
  • contentType
    Type: System.Net.Mime..::..ContentType
    The content type describing the body. If nullNothingnullptrunita null reference (Nothing in Visual Basic) text/plain, UTF-8 is assumed.
  • state
    Type: System..::..Object
    A user-provided object that distinguishes this particular asynchronous operation from others.

Return Value

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

Exceptions

Exception Condition
ArgumentNullException

Thrown when a non-nullNothingnullptrunita null reference (Nothing in Visual Basic) is expected for an argument. The argument name for which a non-nullNothingnullptrunita null reference (Nothing in Visual Basic) is expected is part of the exception message.

ServerPolicyException

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

ArgumentException

Thrown if one of the [SignalingHeader] in the [signalingHeaders] collection has nullNothingnullptrunita null reference (Nothing in Visual Basic) or a restricted header.

See Also

Reference

SipPeerToPeerEndpoint Class

SipPeerToPeerEndpoint Members

BeginSendMessage Overload

Microsoft.Rtc.Signaling Namespace