|
|||
|
|||
|
#include <resolvers.h>
Inheritance diagram for ServernameResolver:


Public Member Functions | |
| ServernameResolver (Module *me, SpanningTreeUtilities *Util, InspIRCd *Instance, const std::string &hostname, Link x, bool &cached, QueryType qt) | |
| This class is used to resolve server hostnames during /connect and autoconnect. | |
| void | OnLookupComplete (const std::string &result, unsigned int ttl, bool cached, int resultnum=0) |
| When your lookup completes, this method will be called. | |
| void | OnError (ResolverError e, const std::string &errormessage) |
| If an error occurs (such as NXDOMAIN, no domain name found) then this method will be called. | |
Private Attributes | |
| Link | MyLink |
| A copy of the Link tag info for what we're connecting to. | |
| SpanningTreeUtilities * | Utils |
| QueryType | query |
| std::string | host |
| Module * | mine |
As of 1.1, the resolver system is seperated out from BufferedSocket, so we must do this resolver step first ourselves if we need it. This is totally nonblocking, and will callback to OnLookupComplete or OnError when completed. Once it has completed we will have an IP address which we can then use to continue our connection.
Definition at line 67 of file resolvers.h.
|
||||||||||||||||||||||||||||||||
|
This class is used to resolve server hostnames during /connect and autoconnect. As of 1.1, the resolver system is seperated out from BufferedSocket, so we must do this resolver step first ourselves if we need it. This is totally nonblocking, and will callback to OnLookupComplete or OnError when completed. Once it has completed we will have an IP address which we can then use to continue our connection. Definition at line 36 of file resolvers.cpp. Referenced by OnError(). |
|
||||||||||||
|
If an error occurs (such as NXDOMAIN, no domain name found) then this method will be called.
Reimplemented from Resolver. Definition at line 74 of file resolvers.cpp. References InspIRCd::AddResolver(), DNS_QUERY_A, DNS_QUERY_AAAA, SpanningTreeUtilities::DoFailOver(), host, mine, MyLink, Link::Name, query, Resolver::ServerInstance, ServernameResolver(), InspIRCd::SNO, Utils, and SnomaskManager::WriteToSnoMask(). |
|
||||||||||||||||||||
|
When your lookup completes, this method will be called.
Implements Resolver. Definition at line 41 of file resolvers.cpp. References Link::Bind, SpanningTreeUtilities::DoFailOver(), SpanningTreeUtilities::FindServer(), EventHandler::GetFd(), Link::Hook, SpanningTreeUtilities::hooks, MyLink, Link::Name, Link::Port, Resolver::ServerInstance, InspIRCd::SNO, InspIRCd::SocketCull, Link::Timeout, Utils, and SnomaskManager::WriteToSnoMask(). |
|
|
Definition at line 77 of file resolvers.h. Referenced by OnError(). |
|
|
Definition at line 78 of file resolvers.h. Referenced by OnError(). |
|
|
A copy of the Link tag info for what we're connecting to. We take a copy, rather than using a pointer, just in case the admin takes the tag away and rehashes while the domain is resolving. Definition at line 74 of file resolvers.h. Referenced by OnError(), and OnLookupComplete(). |
|
|
Definition at line 76 of file resolvers.h. Referenced by OnError(). |
|
|
Definition at line 75 of file resolvers.h. Referenced by OnError(), and OnLookupComplete(). |