信息
您所需的主题如下所示。但此主题未包含在此库中。

StreamSocket.ConnectAsync | connectAsync Methods

启动 StreamSocket 对象连接到远程网络目标的异步操作。

重载列表

方法说明
ConnectAsync(EndpointPair) Starts an asynchronous operation on a StreamSocket object to connect to a remote network destination specified as an EndpointPair object.
ConnectAsync(HostName, String) Starts an asynchronous operation on a StreamSocket object to connect to a remote network destination specified by a remote hostname and a remote service name.
ConnectAsync(EndpointPair, SocketProtectionLevel) Starts an asynchronous operation on a StreamSocket object to connect to a remote network destination specified as an EndpointPair object and a SocketProtectionLevel enumeration. This method is not callable from JavaScript.
ConnectAsync(HostName, String, SocketProtectionLevel) Starts an asynchronous operation on a StreamSocket object to connect to a remote destination specified by a remote hostname, a remote service name, and a SocketProtectionLevel.
ConnectAsync(HostName, String, SocketProtectionLevel, NetworkAdapter) Starts an asynchronous operation on a StreamSocket object on a specified local network adapter to connect to a remote destination specified by a remote hostname, a remote service name, and a SocketProtectionLevel.

要求

最低支持客户端

Windows 8

最低支持服务器

Windows Server 2012

最低支持电话

Windows Phone 8

命名空间

Windows.Networking.Sockets
Windows::Networking::Sockets [C++]

元数据

Windows.winmd

DLL

Windows.Networking.dll

Capabilities

ID_CAP_NETWORKING [Windows Phone]

另请参见

StreamSocket

 

 

显示: