RealTimeEndpoint.SendMessage Method (MessageType, RealTimeAddress, ContentType, Byte , IEnumerable<SignalingHeader>)

Synchronously sends a message. The session should be in connected state. This method is not recommended for a UI thread.

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

Syntax

'Declaration
Public Function SendMessage ( _
    messageType As MessageType, _
    sessionTarget As RealTimeAddress, _
    contentType As ContentType, _
    body As Byte(), _
    signalingHeaders As IEnumerable(Of SignalingHeader) _
) As SipResponseData
'Usage
Dim instance As RealTimeEndpoint
Dim messageType As MessageType
Dim sessionTarget As RealTimeAddress
Dim contentType As ContentType
Dim body As Byte()
Dim signalingHeaders As IEnumerable(Of SignalingHeader)
Dim returnValue As SipResponseData

returnValue = instance.SendMessage(messageType, _
    sessionTarget, contentType, body, _
    signalingHeaders)
public SipResponseData SendMessage(
    MessageType messageType,
    RealTimeAddress sessionTarget,
    ContentType contentType,
    byte[] body,
    IEnumerable<SignalingHeader> signalingHeaders
)

Parameters

  • body
    Type: []
    The body for the data.

Return Value

Type: Microsoft.Rtc.Signaling.SipResponseData
The response data.

Exceptions

Exception Condition
ArgumentNullException

Thrown when null is passed for a required argument. The argument name for the required argument is part of the exception message.

FailureResponseException

Thrown when the server or remote participant returns an error. The response code in the exception should give more information about the error.

RealTimeException

Thrown when any of the sub operations of this operation failed due to SIP related errors like connection failure, Authentication failure.

See Also

Reference

RealTimeEndpoint Class

RealTimeEndpoint Members

SendMessage Overload

Microsoft.Rtc.Signaling Namespace