summaryrefslogblamecommitdiffstats
path: root/src/OSSupport/HostnameLookup.h
blob: 3371000634573c498a5e33592729e894bb78f9a1 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                                                                                                        
                          







                                                                    
       

                                                                                                       
 
        
 
                                                                                                                                  
  

// HostnameLookup.h

// Declares the cHostnameLookup class representing an in-progress hostname-to-IP lookup

// This is an internal header, no-one outside OSSupport should need to include it; use Network.h instead





#pragma once

#include "Network.h"
#include <asio/ip/tcp.hpp>





/** Holds information about an in-progress Hostname-to-IP lookup. */
class cHostnameLookup
{
public:
	/** Creates a lookup object and schedules the lookup. */
	static void Lookup(const AString & a_Hostname, cNetwork::cResolveNameCallbacksPtr a_Callbacks);

private:

	static void Callback(cNetwork::cResolveNameCallbacks & a_Callbacks, const asio::ip::tcp::resolver::results_type & a_Addr);
};