Sends a message.

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

Syntax

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

MessageType, _
	
sessionTarget 
As 

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

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

messageType,
	

RealTimeAddress 
sessionTarget,
	
ContentType 
contentType,
	
byte[] 
body,
	
IEnumerable<

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

messageType, 
	

RealTimeAddress^ 
sessionTarget, 
	
ContentType^ 
contentType, 
	
array<
unsigned char>^ 
body, 
	
IEnumerable<

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

Parameters

messageType
Type: Microsoft.Rtc.Signaling . . :: . MessageType
The message type.
sessionTarget
Type: Microsoft.Rtc.Signaling . . :: . RealTimeAddress
Target to send the message.
contentType
Type: ContentType
Content type describing the body. If null text/plain, UTF-8 is assumed.
body
Type: array< Byte > [] () []
The body for the data.
signalingHeaders
Type: IEnumerable < (Of < ( SignalingHeader > ) > )
The 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 others.

Return Value

An IAsyncResult that references the asynchronous operation.

Exceptions

Exception 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.
ArgumentException Thrown if one of the SignalingHeader in signalingHeaders collection have null or restricted header.
Microsoft.Rtc.Signaling . . :: . ServerPolicyException Thrown when a server policy setting does not allow sending the message.

See Also