System::Net::Sockets::Socket::Connect method

Socket::Connect(String, int32_t) method

Establishes a connection to the specified remote endpoint.

void System::Net::Sockets::Socket::Connect(String host, int32_t port)
ParameterTypeDescription
hostStringThe remote host name.
portint32_tThe port number of the remote host.

See Also

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

Establishes a connection to the specified remote endpoint.

void System::Net::Sockets::Socket::Connect(System::ArrayPtr<System::SharedPtr<IPAddress>> addresses, int32_t port)
ParameterTypeDescription
addressesSystem::ArrayPtr<System::SharedPtr<IPAddress>>The IP addresses of the remote host.
portint32_tThe port number of the remote host.

See Also

Socket::Connect(System::SharedPtr<EndPoint>) method

Establishes a connection to the specified remote endpoint.

void System::Net::Sockets::Socket::Connect(System::SharedPtr<EndPoint> remoteEP)
ParameterTypeDescription
remoteEPSystem::SharedPtr<EndPoint>The remote endpoint.

See Also

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

Establishes a connection to the specified remote endpoint.

void System::Net::Sockets::Socket::Connect(System::SharedPtr<IPAddress> address, int32_t port)
ParameterTypeDescription
addressSystem::SharedPtr<IPAddress>The remote host IP address.
portint32_tThe port number of the remote host.

See Also