-api-id | -api-type |
---|---|
M:Windows.Networking.Sockets.StreamWebSocket.ConnectAsync(Windows.Foundation.Uri) |
winrt method |
Starts an asynchronous operation to connect to a remote network destination on a StreamWebSocket object.
An absolute Uri for the server to connect to.
An asynchronous connect operation on a StreamWebSocket object.
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.