From: Christopher Kohlhoff (chris_at_[hidden])
Date: 2006-03-13 07:24:17
--- Jeff Flinn <TriumphSprint2000_at_[hidden]> wrote:
> This brings up one of the bothersome aspects of asio interface, IMHO.
> Functions like:
> template<typename Endpoint>
> void get_local_endpoint (Endpoint &endpoint)
> make it difficult to use in the context of an initializer list.
As Arvid mentioned, this has already changed in asio's cvs
repository. It's part of a change suggested during the review to
add stronger typing for the socket classes. For example, you can
ip::tcp::endpoint ep = socket.local_endpoint();
> Any reason this was not considered? The same goes for host and host
> resolver's get_host_by_name.
I intend to replace the host_resolver class with a new interface
based on getaddrinfo/getnameinfo that can support both IPv4 and
IPv6. This will probably return an iterator that can be used to
enumerate all endpoints that match some criteria. E.g. something
ip::tcp::resolver::query query("some.host", "daytime");
ip::tcp::resolver::iterator iter = resolver.resolve(query);
while (iter != end)
ip::tcp::endpoint endpoint = iter->endpoint();
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk