Construct an endpoint using a port number, specified in the host's byte order. The IP address will be the any address (i.e. INADDR_ANY or in6addr_any). This constructor would typically be used for accepting new connections.
basic_endpoint( const InternetProtocol & internet_protocol, unsigned short port_num);
To initialise an IPv4 TCP endpoint for port 1234, use:
std::experimental::net::ip::tcp::endpoint ep(std::experimental::net::ip::tcp::v4(), 1234);
To specify an IPv6 UDP endpoint for port 9876, use:
std::experimental::net::ip::udp::endpoint ep(std::experimental::net::ip::udp::v6(), 9876);