BeginSetConnection Method
Sets the connection for the outgoing signaling session before calling [Participate].
Namespace: Microsoft.Rtc.Signaling
Assembly: Microsoft.Rtc.Collaboration (in Microsoft.Rtc.Collaboration.dll)
Syntax
'Declaration
Public Function BeginSetConnection ( _
proxyHost As String, _
proxyPort As Integer, _
transport As SipTransportType, _
userCallback As AsyncCallback, _
state As Object _
) As IAsyncResult
'Usage
Dim instance As SignalingSession
Dim proxyHost As String
Dim proxyPort As Integer
Dim transport As SipTransportType
Dim userCallback As AsyncCallback
Dim state As Object
Dim returnValue As IAsyncResult
returnValue = instance.BeginSetConnection(proxyHost, _
proxyPort, transport, userCallback, _
state)
public IAsyncResult BeginSetConnection(
string proxyHost,
int proxyPort,
SipTransportType transport,
AsyncCallback userCallback,
Object state
)
Parameters
- proxyHost
Type: System..::..String
The proxy host for the connection.
- proxyPort
Type: System..::..Int32
The port for the proxy.
- transport
Type: Microsoft.Rtc.Signaling..::..SipTransportType
The transport.
- userCallback
Type: System..::..AsyncCallback
The callback to be invoked when the [SetConnection] operation is complete.
- state
Type: System..::..Object
The state to be passed back to the callback.
Return Value
Type: System..::..IAsyncResult
An [IAsyncResult] that references this operation.
Remarks
The initial INVITE for the session uses this connection instead getting the connection based on endpoint settings. This method can be used only for [SipPeerToPeer] endpoint. Signaling sessions for [SipEndpoint] use the connection maintained by [SipEndpoint]. The transport specified for the connection should be as secure as the transport needed to send the INVITE or else the [Participate] method call might fail.
Important
This is an advanced API. To work properly, the application should call this method before every redirect as well. The [RedirectReceived] event call back handler in the application should use TryThis and call this method before returning.