Edit

Share via


SignalingSession.SendMessage Method

Definition

Overloads

SendMessage(MessageType, ContentType, Byte[])

Synchronously sends a message. The session should be in the Connected state. This method is not recommended for a UI thread.

SendMessage(MessageType, ContentType, Byte[], IEnumerable<SignalingHeader>)

Synchronously sends a message. The session should be in the Connected state. This method is not recommended for a UI thread.

SendMessage(MessageType, ContentType, Byte[])

Synchronously sends a message. The session should be in the Connected state. This method is not recommended for a UI thread.

public:
 Microsoft::Rtc::Signaling::SipResponseData ^ SendMessage(Microsoft::Rtc::Signaling::MessageType messageType, System::Net::Mime::ContentType ^ contentType, cli::array <System::Byte> ^ body);
public Microsoft.Rtc.Signaling.SipResponseData SendMessage (Microsoft.Rtc.Signaling.MessageType messageType, System.Net.Mime.ContentType contentType, byte[] body);
member this.SendMessage : Microsoft.Rtc.Signaling.MessageType * System.Net.Mime.ContentType * byte[] -> Microsoft.Rtc.Signaling.SipResponseData

Parameters

messageType
MessageType

Type of the body (message or info).

contentType
ContentType

Content type describing the body. If null text/plain, UTF-8 is assumed.

body
Byte[]

Body for the data.

Returns

Returns the response data.

Exceptions

Thrown when the session is an invalid state to send message.

Thrown when invalid arguments are passed.

Thrown when null is supplied for a required argument. The argument name which is required is is part of the exception message.

Thrown when the server or remote participant returns an error. The SipResponseData in the exception should give additional information.

Thrown when some other unknown errors occur.

A server policy setting does not allow the sending of the message.

Applies to

SendMessage(MessageType, ContentType, Byte[], IEnumerable<SignalingHeader>)

Synchronously sends a message. The session should be in the Connected state. This method is not recommended for a UI thread.

public:
 Microsoft::Rtc::Signaling::SipResponseData ^ SendMessage(Microsoft::Rtc::Signaling::MessageType messageType, System::Net::Mime::ContentType ^ contentType, cli::array <System::Byte> ^ body, System::Collections::Generic::IEnumerable<Microsoft::Rtc::Signaling::SignalingHeader ^> ^ signalingHeaders);
public Microsoft.Rtc.Signaling.SipResponseData SendMessage (Microsoft.Rtc.Signaling.MessageType messageType, System.Net.Mime.ContentType contentType, byte[] body, System.Collections.Generic.IEnumerable<Microsoft.Rtc.Signaling.SignalingHeader> signalingHeaders);
member this.SendMessage : Microsoft.Rtc.Signaling.MessageType * System.Net.Mime.ContentType * byte[] * seq<Microsoft.Rtc.Signaling.SignalingHeader> -> Microsoft.Rtc.Signaling.SipResponseData

Parameters

messageType
MessageType

The type of the body (message or info).

contentType
ContentType

the content type describing the body. Can be null if body is null and if null text/plain, UTF-8 is assumed.

body
Byte[]

the body for the data.

signalingHeaders
IEnumerable<SignalingHeader>

A collection of headers provided for this message. Can be null.

Returns

Returns the response data.

Exceptions

Thrown when the session is in an invalid state to send a message.

Thrown when invalid arguments are passed.

Thrown when null is supplied for a required argument. The argument name which is required is is part of the exception message.

Thrown when the server or remote participant returns an error. The SipResponseData in the exception should give additional information.

Thrown when some other unknown errors occur.

A server policy setting does not allow the sending of the message.

Applies to