26class GNet::DnsblImp :
private DnsBlockCallback
29 DnsblImp( std::function<
void(
bool)> callback , EventState es , std::string_view config ) :
30 m_callback(
std::move(callback)) ,
31 m_block(*this,es,config)
34 void onDnsBlockResult(
const DnsBlockResult & result )
override
38 m_callback( result.allow() ) ;
40 std::function<void(
bool)> m_callback ;
44GNet::Dnsbl::Dnsbl( std::function<
void(
bool)> callback , EventState es , std::string_view config ) :
45 m_imp(
std::make_unique<DnsblImp>(callback,es,config))
54 m_imp->m_block.start( address ) ;
59 return m_imp->m_block.busy() ;
static void checkConfig(const std::string &)
Checks the configure() string, throwing on error.
bool busy() const
Returns true after start() and before the completion callback.
static void checkConfig(const std::string &)
See DnsBlock::checkConfig().
void start(const Address &)
Starts an asychronous check on the given address.
Dnsbl(std::function< void(bool)> callback, EventState, std::string_view config={})
Constructor. See DnsBlock::DnsBlock().