|
E-MailRelay
|
A DNS MX lookup client. More...
#include <gmxlookup.h>
Inheritance diagram for GFilters::MxLookup:
Collaboration diagram for GFilters::MxLookup:Classes | |
| struct | Config |
| A configuration structure for GFilters::MxLookup. More... | |
Public Member Functions | |
| MxLookup (GNet::EventState, Config={}) | |
| Constructor. More... | |
| MxLookup (GNet::EventState, Config, const std::vector< GNet::Address > &ns) | |
| Constructor taking a list of nameservers. More... | |
| void | start (const GStore::MessageId &, const std::string &question_domain, unsigned int port) |
| Starts the lookup. More... | |
| G::Slot::Signal< GStore::MessageId, std::string, std::string > & | doneSignal () noexcept |
| Returns a reference to the completion signal. More... | |
| void | cancel () |
| Cancels the lookup so the doneSignal() is not emitted. More... | |
Static Public Member Functions | |
| static bool | enabled () |
| Returns true if implemented. More... | |
A DNS MX lookup client.
Each nameserver is queried in turn with a 'ns_timeout' interval. After the final nameserver has been queried there is a 'restart_timeout' before the sequence starts again. There is no overall timeout.
Definition at line 49 of file gmxlookup.h.
|
explicit |
Constructor.
Definition at line 48 of file gmxlookup.cpp.
|
explicit |
Constructor taking a list of nameservers.
Definition at line 54 of file gmxlookup.cpp.
| void GFilters::MxLookup::cancel | ( | ) |
Cancels the lookup so the doneSignal() is not emitted.
Definition at line 247 of file gmxlookup.cpp.
|
noexcept |
Returns a reference to the completion signal.
The signal parameters are (1) the original message id, (2) the answer port-25 transport address (if successful), and (3) the error reason (if not).
Definition at line 304 of file gmxlookup.cpp.
|
static |
Returns true if implemented.
Definition at line 42 of file gmxlookup.cpp.
| void GFilters::MxLookup::start | ( | const GStore::MessageId & | message_id, |
| const std::string & | question_domain, | ||
| unsigned int | port | ||
| ) |
Starts the lookup.
Definition at line 89 of file gmxlookup.cpp.