Share via


RealTimeEndpoint.SendMessage Method (MessageType, RealTimeAddress, ContentType, Byte )

Synchronously sends a message. The endpoint should be in the 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() _
) As SipResponseData
'Usage
Dim instance As RealTimeEndpoint
Dim messageType As MessageType
Dim sessionTarget As RealTimeAddress
Dim contentType As ContentType
Dim body As Byte()
Dim returnValue As SipResponseData

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

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