1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 01:57:35 +00:00

LookupServer: Use CUdpSocket instead of the POSIX API

LibCore's UDP socket is a bit more comfortable to work with. :^)
This commit is contained in:
Andreas Kling 2020-01-26 14:47:03 +01:00
parent 3c129172d4
commit e335d730d6
2 changed files with 17 additions and 67 deletions

View file

@ -28,10 +28,7 @@
#include "DNSRequest.h"
#include <AK/HashMap.h>
#include <AK/RefPtr.h>
#include <AK/String.h>
#include <LibCore/CObject.h>
#include <netinet/in.h>
class CLocalSocket;
class CLocalServer;
@ -47,8 +44,6 @@ private:
void service_client(RefPtr<CLocalSocket>);
Vector<String> lookup(const String& hostname, bool& did_timeout, unsigned short record_type, ShouldRandomizeCase = ShouldRandomizeCase::Yes);
int make_dns_request_socket(sockaddr_in& dst_addr);
struct CachedLookup {
time_t timestamp { 0 };
unsigned short record_type { 0 };