Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

Name Resolution

The name resolution class. More...

Classes

class  ss::resolver_result_iterator
 Resolver result container element iterator. More...
class  ss::resolver_result
 Container of resolved network addresses. More...
class  ss::resolver
 Encapsulates name resolution services. More...

Detailed Description

The name resolution class.

Features of the name resolution class:

Using the name resolution class:

 resolver r;
 r.resolve("www.example.com", "http");
 
 resolver_result& result = r.result();
 resolver_result::iterator i = result.begin();
 while (i != result.end())
   if (predicate(*i++))
     break;
 
 int socket = socket(AF_INET, SOCK_STREAM, 0);
 connect(socket, i->ai_addr, i->ai_addrlen);

Interacting with the Network Addressing module:

 resolver r;
 r.resolve("www.example.com", "http");
 resolver_result& result = r.result();
 
 ipv4_address address;
 for (resolver_result::iterator i = result.begin();
      i != result.end(); ++i) {
   if (predicate(*i)) {
     address = *i->ai_addr;
     break;
   }
 }

Generated on Sat May 21 21:25:46 2005 for Socket Streams Library by  doxygen 1.4.3