Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

MessageWebSocket.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 MessageWebSocket 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

uri
Uri Uri

An absolute Uri for the server to connect to.

Returns

An asynchronous connect operation on a MessageWebSocket object.

Implements

M:Windows.Networking.Sockets.IWebSocket.ConnectAsync(Windows.Foundation.Uri) M:Windows.Networking.Sockets.IWebSocket.ConnectAsync(System.Uri)
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.

Applies to

See also


Feedback

Was this page helpful?