New IPEndPoint Constructor

Constructor for creating an IP endpoint object and optionally initializing it.
New IPEndPoint (IP_address, port_number)

Prerequisites

None

Parameters

IP_address

An optional string containing a standard IP address in the form “nnn.nnn.nnn.nnn”. This address identifies a computer or computer-based device on the network. If omitted, or empty, the IP address is assumed to be a “wild card”, matching any address.

port_number

An optional number specifying the port number from 0 to 65536 of a process, protocol, or connection. If omitted, the port number is assigned automatically.

Remarks

The combination of IP address and port uniquely specifies a computer and process on a network. When messages are exchanged, both the sender and the receiver have an endpoint address consisting of these two items.

Examples

Dim ep As New IPEndPoint("192.168.0.2", 1234)   ' Port 1234 at address 192.168.0.2
Dim ep As New IPEndPoint("", 69) ' Port 69 at any address

See Also

Networking Classes | ipendpoint_object.IPAddress | ipendpoint_object.Port