Connect()

UdpClient::Connect(String, int32_t) method

Establishes a connection to the specified port on the specified host.

void System::Net::Sockets::UdpClient::Connect(String hostname, int32_t port)

Arguments

ParameterTypeDescription
hostnameStringThe name of the remote DNS host to which you intend to connect.
portint32_tThe local port number from which you intend to communicate.

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

Establishes a connection with the host at the specified address on the specified port.

void System::Net::Sockets::UdpClient::Connect(System::SharedPtr<IPAddress> addr, int32_t port)

Arguments

ParameterTypeDescription
addrSystem::SharedPtr<IPAddress>The IPAddress of the remote host to which to send data.
portint32_tThe local port number from which you intend to communicate.

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

Establishes a connection to a remote end point.

void System::Net::Sockets::UdpClient::Connect(System::SharedPtr<IPEndPoint> endPoint)

Arguments

ParameterTypeDescription
endPointSystem::SharedPtr<IPEndPoint>the endpoint to which you bind the UDP connection.

See Also