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

Visual Basic (Declaration)
Public 
MustOverride 
Sub 
SendResponse ( _
	
responseCode 
As 
Integer, _
	
contentType 
As 
ContentType, _
	
msgBody 
As 
String, _
	
signalingHeaders 
As 
IEnumerable(
Of 

SignalingHeader) _
)
C#
public 
abstract 
void 
SendResponse(
	
int 
responseCode,
	
ContentType 
contentType,
	
string 
msgBody,
	
IEnumerable<

SignalingHeader> 
signalingHeaders
)
Visual C++
public:
virtual 
void 
SendResponse(
	
int 
responseCode, 
	
ContentType^ 
contentType, 
	
String^ 
msgBody, 
	
IEnumerable<

SignalingHeader^>^ 
signalingHeaders
) 
abstract
JavaScript
function 
sendResponse(
responseCode, 
contentType, 
msgBody, 
signalingHeaders);

Parameters

responseCode
Type: Int32
The response code to be sent.
contentType
Type: ContentType
Content type of the response body.
msgBody
Type: String
The body of the message.
signalingHeaders
Type: IEnumerable < (Of < ( SignalingHeader > ) > )
Headers required for this message.

Exceptions

Exception Condition
InvalidOperationException Thrown when in an invalid state, or a response has already been sent.
Microsoft.Rtc.Signaling . . :: . RealTimeException Thrown when a transport error occurred while sending a response.

See Also