System::Net::Sockets::TcpClient::Connect method

TcpClient::Connect(String, int32_t) method

建立到指定远程主机的连接。

void System::Net::Sockets::TcpClient::Connect(String hostname, int32_t port)
参数类型描述
hostnameString要连接的远程主机名。
portint32_t要连接的远程主机端口。

另见

TcpClient::Connect(System::ArrayPtr<System::SharedPtr<IPAddress>>, int32_t) method

建立到指定远程主机的连接。

void System::Net::Sockets::TcpClient::Connect(System::ArrayPtr<System::SharedPtr<IPAddress>> ipAddresses, int32_t port)
参数类型描述
ipAddressesSystem::ArrayPtr<System::SharedPtr<IPAddress>>远程主机的 IP 地址。
portint32_t要连接的远程主机端口。

另见

TcpClient::Connect(System::SharedPtr<IPAddress>, int32_t) method

建立到指定远程主机的连接。

void System::Net::Sockets::TcpClient::Connect(System::SharedPtr<IPAddress> address, int32_t port)
参数类型描述
地址System::SharedPtr<IPAddress>远程主机的 IP 地址。
portint32_t要连接的远程主机端口。

另见

TcpClient::Connect(System::SharedPtr<IPEndPoint>) method

建立到指定远程主机的连接。

void System::Net::Sockets::TcpClient::Connect(System::SharedPtr<IPEndPoint> remoteEP)
参数类型描述
remoteEPSystem::SharedPtr<IPEndPoint>要连接的远程主机。

另见