SendMessage Method (MessageType, RealTimeAddress, ContentType, Byte[])

Sends a message synchronously.

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


Public Function SendMessage ( _
    messageType As MessageType, _
    sessionTarget As RealTimeAddress, _
    contentType As ContentType, _
    body As Byte() _
) As SipResponseData
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


  • 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.

Return Value

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


Exception Condition

Thrown when the session object is disposed.


Thrown when 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.


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


Encompasses an SIP error or failure cases encountered during sending the message - SIP Transport error, SIP Authentication, and credential-related errors.


The endpoint should be in the Connected state. This method is not recommended for a UI thread.

See Also


RealTimeEndpoint Class

RealTimeEndpoint Members

SendMessage Overload

Microsoft.Rtc.Signaling Namespace