Partilhar via


MessageReceivedEventArgs.SendResponse Method (Int32, ContentType, String, IEnumerable<SignalingHeader>)

Sends response to this message with a specified body and specified headers. This method is optional for message received events. If the application does not call SendResponse in MessageReceived handlers, the platform will automatically respond with ResponseCode.Succeeded.

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

Syntax

'Declaration
Public MustOverride Sub SendResponse ( _
    responseCode As Integer, _
    contentType As ContentType, _
    msgBody As String, _
    signalingHeaders As IEnumerable(Of SignalingHeader) _
)
'Usage
Dim instance As MessageReceivedEventArgs
Dim responseCode As Integer
Dim contentType As ContentType
Dim msgBody As String
Dim signalingHeaders As IEnumerable(Of SignalingHeader)

instance.SendResponse(responseCode, contentType, _
    msgBody, signalingHeaders)
public abstract void SendResponse(
    int responseCode,
    ContentType contentType,
    string msgBody,
    IEnumerable<SignalingHeader> signalingHeaders
)

Parameters

  • responseCode
    Type: System.Int32
    The response code to be sent.

Exceptions

Exception Condition
InvalidOperationException

Thrown when in an invalid state, or a response has already been sent.

RealTimeException

Thrown when a transport error occurred while sending a response.

See Also

Reference

MessageReceivedEventArgs Class

MessageReceivedEventArgs Members

SendResponse Overload

Microsoft.Rtc.Signaling Namespace