1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 20:27:46 +00:00

LookupServer: Make lookup() return DNSAnswer's instead of strings

This way, we propagate proper TTL. None of the callers currently care, though.
This commit is contained in:
Sergey Bugaev 2021-02-14 16:57:41 +03:00 committed by Andreas Kling
parent 3fba6bfb5e
commit 19cfed329e
3 changed files with 40 additions and 23 deletions

View file

@ -39,7 +39,7 @@ class LookupServer final : public Core::Object {
public:
static LookupServer& the();
Vector<String> lookup(const DNSName& name, unsigned short record_type);
Vector<DNSAnswer> lookup(const DNSName& name, unsigned short record_type);
private:
LookupServer();
@ -47,7 +47,7 @@ private:
void load_etc_hosts();
void put_in_cache(const DNSAnswer&);
Vector<String> lookup(const DNSName& hostname, const String& nameserver, bool& did_get_response, unsigned short record_type, ShouldRandomizeCase = ShouldRandomizeCase::Yes);
Vector<DNSAnswer> lookup(const DNSName& hostname, const String& nameserver, bool& did_get_response, unsigned short record_type, ShouldRandomizeCase = ShouldRandomizeCase::Yes);
RefPtr<Core::LocalServer> m_local_server;