Send a message to the remote partcipant specified.

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

Syntax

Visual Basic (Declaration)
Protected 
Function 
BeginSendMessage ( _
	
messageType 
As 

MessageType, _
	
contentType 
As 
ContentType, _
	
body 
As 
Byte(), _
	
signalingHeaders 
As 
IEnumerable(
Of 

SignalingHeader), _
	
userCallback 
As 
AsyncCallback, _
	
state 
As 
Object _
) 
As 
IAsyncResult
C#
protected 
IAsyncResult 
BeginSendMessage(
	
MessageType

messageType,
	
ContentType 
contentType,
	
byte[] 
body,
	
IEnumerable<

SignalingHeader> 
signalingHeaders,
	
AsyncCallback 
userCallback,
	
Object 
state
)
Visual C++
protected:
IAsyncResult^ 
BeginSendMessage(
	
MessageType

messageType, 
	
ContentType^ 
contentType, 
	
array<
unsigned char>^ 
body, 
	
IEnumerable<

SignalingHeader^>^ 
signalingHeaders, 
	
AsyncCallback^ 
userCallback, 
	
Object^ 
state
)
JavaScript
function 
beginSendMessage(
messageType, 
contentType, 
body, 
signalingHeaders, 
userCallback, 
state);

Parameters

messageType
Type: Microsoft.Rtc.Signaling . . :: . MessageType
Type of the body of the message
contentType
Type: ContentType
Content type describing the body. Can be null if body is null.
body
Type: array< Byte > [] () []
The body for the data. Can be null.
signalingHeaders
Type: IEnumerable < (Of < ( SignalingHeader > ) > )
Headers provided for this invite.
userCallback
Type: AsyncCallback
The method to be called when the asynchronous operation is completed.
state
Type: Object
A user-provided object that distinguishes this particular asynchronous operation from other asynchronous operations.

Return Value

An IAsyncResult that references the asynchronous operation.

Exceptions

Exception Condition
ArgumentException

Thrown when a body is specified without a content type with media type.

Thrown if messageType is other than Message, Info or Options

InvalidOperationException Thrown when the call is in an invalid state.
Microsoft.Rtc.Signaling . . :: . ServerPolicyException Thrown when a server policy setting does not allow the sending of the message.

See Also