StreamWebSocket.ConnectAsync(Uri) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Starts an asynchronous operation to connect to a remote network destination on a StreamWebSocket object.
public:
virtual IAsyncAction ^ ConnectAsync(Uri ^ uri) = ConnectAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncAction ConnectAsync(Uri const& uri);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncAction ConnectAsync(System.Uri uri);
function connectAsync(uri)
Public Function ConnectAsync (uri As Uri) As IAsyncAction
Parameters
Returns
An asynchronous connect operation on a StreamWebSocket object.
Implements
- Attributes
Remarks
The ConnectAsync method initiates the WebSocket handshake with a remote network destination, and then negotiates the subprotocol.
For WebSocket connections over TCP, use the ws:// scheme in the uri. For secure WebSocket connections over TLS/SSL, use the wss:// scheme.