Boost logo

Boost :

From: Hu Xinwei (huxw_at_[hidden])
Date: 2002-11-26 10:05:09


>There seems to be support for independent resolution, proposed as a
>getaddrinfo wrapper for hostname+service resolution, or by Michel's
>ip_resolver class for hostname resolution.
>Which other protocols can use name resolution?

>There is also a strong push for unified ip4, ip6 address class.
>Michel has made a very good ip_address proposal.

>Do we need 3 ip address classes or just the final one ?
> * an ip4 address class,
> * an ip6 address class,
> * a combined ip4/ip6 address class.

>Michel has also proposed changing the address concept to add a to_str()
>representation of an address, and return the representation
>through:
> std::pair<void*,unsigned> representaion();

>Michel Andre and another (anonymous as far as I can tell) poster have
>commented on addressing at:
>http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?BoostSocket/AddressConcept

  That poster was me(sorry, I dont familiar with wiki). IMHO, addrinfo/getaddrinof/freeaddrinfo
are much better than those obsoleted gethostbyname.... The reasons are simple.
1. getaddrinfo is thread-safe. And not all OS provide those functions like gethostbyname_r
2. getaddrinfo resovle one name to multiaddresses, especially a name with both IPv4 addresses,
   and IPv6 addresses.

  And since all operations on Socket are protocol-independent, I think a combined ip4/ip6
address class is enough.

>Boris Schaeling also commented in
>news://news.gmane.org/gmane.comp.lib.boost.devel/12305


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk