New UdpClient Constructor

Constructor for creating a UdpClient Object.

New UdpClient (endpoint)

Prerequisites

None

Parameters

endpoint

An optional IPEndPoint Object that contains the IP address and port identifying the local endpoint for datagrams recognized by this UDP Socket. The IP address of this endpoint is ignored since GPL controllers only have a single IP address. If the port is non-zero, only datagrams to the specified port can be received.

Remarks

This constructor creates a new UdpClient Object and creates the underlying Socket. No network I/O is generated by this method.

Examples

Dim ep As New IPEndPoint("", 1234)  ' Port 1234
Dim uc As New UdpClient(ep) ' Create a socket for UDP communications

See Also

Networking Classes | udpclient_object.Client