Connect()

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

Establishes a connection to the specified remote endpoint.

void System::Net::Sockets::Socket::Connect(System::SharedPtr<EndPoint> remoteEP)

Arguments

ParameterTypeDescription
remoteEPSystem::SharedPtr<EndPoint>The remote endpoint.

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)

Arguments

ParameterTypeDescription
addressSystem::SharedPtr<IPAddress>The remote host IP address.
portint32_tThe port number of the remote host.

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)

Arguments

ParameterTypeDescription
hostStringThe remote host name.
portint32_tThe port number of the remote host.

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)

Arguments

ParameterTypeDescription
addressesSystem::ArrayPtr<System::SharedPtr<IPAddress>>The IP addresses of the remote host.
portint32_tThe port number of the remote host.

See Also