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

TcpClient::Connect(String, int32_t) method

Establishes a connection to the specified remote host.

void System::Net::Sockets::TcpClient::Connect(String hostname, int32_t port)
ParameterTypeDescription
hostnameStringA remote host name to connect.
portint32_tA port of the remote host to connect.

See Also

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

Establishes a connection to the specified remote host.

void System::Net::Sockets::TcpClient::Connect(System::SharedPtr<IPAddress> address, int32_t port)
ParameterTypeDescription
addressSystem::SharedPtr<IPAddress>The IP address of a remote host.
portint32_tA port of the remote host to connect.

See Also

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

Establishes a connection to the specified remote host.

void System::Net::Sockets::TcpClient::Connect(System::SharedPtr<IPEndPoint> remoteEP)
ParameterTypeDescription
remoteEPSystem::SharedPtr<IPEndPoint>A remote host to connect.

See Also

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

Establishes a connection to the specified remote host.

void System::Net::Sockets::TcpClient::Connect(System::ArrayPtr<System::SharedPtr<IPAddress>> ipAddresses, int32_t port)
ParameterTypeDescription
ipAddressesSystem::ArrayPtr<System::SharedPtr<IPAddress>>The IP addresses of a remote host.
portint32_tA port of the remote host to connect.

See Also