MessageReceivedEventArgs.SendResponse Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
SendResponse(Int32) |
Sends a response to this message with specified response code. 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. |
SendResponse(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. |
SendResponse(Int32)
Sends a response to this message with specified response code. 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.
public:
void SendResponse(int responseCode);
public void SendResponse (int responseCode);
member this.SendResponse : int -> unit
Public Sub SendResponse (responseCode As Integer)
Parameters
- responseCode
- Int32
The response code to be sent.
Exceptions
Thrown when in an invalid state or when a response has already been sent.
Thrown when a transport error occurred while sending a response.
Applies to
SendResponse(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.
public:
abstract void SendResponse(int responseCode, System::Net::Mime::ContentType ^ contentType, System::String ^ msgBody, System::Collections::Generic::IEnumerable<Microsoft::Rtc::Signaling::SignalingHeader ^> ^ signalingHeaders);
public abstract void SendResponse (int responseCode, System.Net.Mime.ContentType contentType, string msgBody, System.Collections.Generic.IEnumerable<Microsoft.Rtc.Signaling.SignalingHeader> signalingHeaders);
abstract member SendResponse : int * System.Net.Mime.ContentType * string * seq<Microsoft.Rtc.Signaling.SignalingHeader> -> unit
Parameters
- responseCode
- Int32
The response code to be sent.
- contentType
- ContentType
Content type of the response body.
- msgBody
- String
The body of the message.
- signalingHeaders
- IEnumerable<SignalingHeader>
Headers required for this message. Can be null.
Exceptions
Thrown when in an invalid state, or a response has already been sent.
Thrown when a transport error occurred while sending a response.