It seems boost::asio
defines a separate endpoint class for each protocol, which is irritating if you want to perform both UDP and TCP operations on a particular endpoint (have to convert from one to the other). I'd always just thought of an endpoint as an IP address (v4 or v6) and the port number, regardless of TCP or UDP.
Are there significant differences that justify separate classes? (i.e. couldn't both tcp::socket
and udp::socket
accept something like ip::endpoint
?)