mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-26 19:28:59 +00:00
LibDNS: Prefer spans over raw pointers when parsing DNS packets
This means we don't have to keep track of the pointer and size separately.
This commit is contained in:
parent
c1d7a51391
commit
4e3b59a4bb
Notes:
sideshowbarker
2024-07-17 02:05:41 +09:00
Author: https://github.com/tcl3
Commit: 4e3b59a4bb
Pull-request: https://github.com/SerenityOS/serenity/pull/21753
7 changed files with 23 additions and 25 deletions
|
@ -24,7 +24,7 @@ class Packet {
|
|||
public:
|
||||
Packet() = default;
|
||||
|
||||
static Optional<Packet> from_raw_packet(u8 const*, size_t);
|
||||
static Optional<Packet> from_raw_packet(ReadonlyBytes bytes);
|
||||
ErrorOr<ByteBuffer> to_byte_buffer() const;
|
||||
|
||||
bool is_query() const { return !m_query_or_response; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue