diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-18 18:35:25 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-18 18:35:25 +0000 |
commit | 1c52b90e826ca3fdef6d55fccd7abbc4fdd90574 (patch) | |
tree | 371a98680608cc7442a331f632f312ba0bd4f84c /include/dns.h | |
parent | 52d979a28200288ed38d8292f0727a804df76a9b (diff) |
Refactor dns.cpp to use an array of request types rather than map, for O(1) lookup time
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6042 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/dns.h')
-rw-r--r-- | include/dns.h | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/include/dns.h b/include/dns.h index 4087e2476..038323a43 100644 --- a/include/dns.h +++ b/include/dns.h @@ -87,16 +87,6 @@ class DNSHeader; class ResourceRecord; /** - * A set of requests keyed by request id - */ -typedef std::map<int,DNSRequest*> requestlist; - -/** - * An iterator into a set of requests - */ -typedef requestlist::iterator requestlist_iter; - -/** * Query and resource record types */ enum QueryType @@ -255,11 +245,6 @@ class DNS : public EventHandler static const int MAX_REQUEST_ID = 0xFFFF; /** - * Requests that are currently 'in flight' - */ - requestlist requests; - - /** * Server address being used currently */ insp_inaddr myserver; @@ -288,6 +273,10 @@ class DNS : public EventHandler */ Resolver* Classes[MAX_REQUEST_ID]; /** + * Requests that are currently 'in flight' + */ + DNSRequest* requests[MAX_REQUEST_ID]; + /** * The port number DNS requests are made on, * and replies have as a source-port number. */ |