SignalingSession.SendMessage Method (MessageType, ContentType, Byte[], Generic IEnumerable)
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
Sends a message synchronously.
Namespace: Microsoft.Rtc.Signaling
Assembly: Microsoft.Rtc.Collaboration (in microsoft.rtc.collaboration.dll)
Syntax
'Declaration
Public Function SendMessage ( _
messageType As MessageType, _
contentType As ContentType, _
body As Byte(), _
signalingHeaders As IEnumerable(Of SignalingHeader) _
) As SipResponseData
public SipResponseData SendMessage (
MessageType messageType,
ContentType contentType,
byte[] body,
IEnumerable<SignalingHeader> signalingHeaders
)
Parameters
- messageType
The type of the body (message or info).
- contentType
The content type describing the body. If null text/plain, UTF-8 is assumed.
- body
The body for the data.
- signalingHeaders
A collection of headers provided for this INVITE.
Return Value
A SipResponseData object containing the response data.
Exceptions
Exception type | Condition |
---|---|
ArgumentNullException | Thrown when a non-null is expected for an argument. The argument name for which a non-null is expected is part of the exception message. |
ServerPolicyException | A server policy setting does not allow the sending of the message. |
RealTimeException | Thrown when the server or remote participant returns an error. The response code in the exception should give more information about the error or encompasses an SIP error or failure cases encountered during sending the message - SIP Transport error, SIP Authentication, and credential-related errors. |
ArgumentException | Thrown when invalid arguments are passed. |
InvalidOperationException | Thrown when the session is in an invalid state to send a message. |
FailureResponseException | Thrown when the server or remote participant returns an error. The SipResponseData in the exception should give additional information. |
Remarks
The session should be in the Connected state. This method is not recommended for a UI thread.
Thread Safety
All public static (Shared in Visual Basic) members of this type are thread-safe. Instance members are not guaranteed to be thread-safe.
Platforms
Development Platforms
Windows XP Professional with Service Pack 2 (SP2), Windows Server 2003, Windows Vista Ultimate Edition, Windows Vista Business Edition, Windows Vista Enterprise Edition
Target Platforms
See Also
Reference
SignalingSession Class
SignalingSession Members
Microsoft.Rtc.Signaling Namespace