For an endpoint as a whole, what address a WebSocket++ server listens on is determined by which listen overload you use. The overloads that take just a port or a protocol and a port will listen on all interfaces. If you want to listen on a specific interface you can use the either the overload that takes a host and service:
or the overload that takes a fully configured asio endpoint:
More information about how to configure an asio endpoint or what options are valid for the host/service parameters can be found in the Boost Asio documentation.
For a specific already existing connection, you can also retrieve information about the exact local and remove endpoints in use. You can retrieve it manually from the socket using the following:
connection.get_raw_socket().local_endpoint()
connection.get_raw_socket().remote_endpoint()
These return a boost::asio::ip::tcp::endpoint that you can either query directly for a machine readable address/port or output to a stream using <<.
WebSocket++ provides a convenience method for returning a human readable string describing the remote endpoint of a connection using connection::get_remote_endpoint(). This method is independent of the asio transport and will gracefully handle cases where the endpoint is unknown, unavailable, or passed through from an io_stream based connection. As of alpha3 there is no get_local_endpoint() method, but if you would find that useful I can add it.