1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 04:48:14 +00:00
Commit graph

3 commits

Author SHA1 Message Date
Andreas Kling
5e47508672 LookupServer: Cache DNS answers for TTL seconds
We now keep DNS answers around in a cache for TTL seconds after getting
them the first time. The cache is capped at 256 responses for now.

Suggested by @zecke in #10.
2020-01-26 15:44:51 +01:00
Andreas Kling
537a1d31c5 LookupServer: Add missing copyright headers 2020-01-26 13:53:36 +01:00
Andreas Kling
871b6b4e1a LookupServer: Minor overhaul
- Break out request building into a DNSRequest class.
- Break out response parsing into a DNSResponse class.

A DNSRequest contains one or more DNSQuestion objects.
A DNSResponse contains all the DNSQuestions asked, and a DNSAnswer
object for each answer.
2020-01-26 12:37:08 +01:00