mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:07:35 +00:00
IPv4: Use KBuffer instead of ByteBuffer for socket receive queues
This drastically reduces the pressure on the kernel heap when receiving data from IPv4 sockets.
This commit is contained in:
parent
609495882f
commit
72798519cb
7 changed files with 18 additions and 19 deletions
|
@ -16,7 +16,7 @@ private:
|
|||
virtual const char* class_name() const override { return "UDPSocket"; }
|
||||
static Lockable<HashMap<u16, UDPSocket*>>& sockets_by_port();
|
||||
|
||||
virtual int protocol_receive(const ByteBuffer&, void* buffer, size_t buffer_size, int flags) override;
|
||||
virtual int protocol_receive(const KBuffer&, void* buffer, size_t buffer_size, int flags) override;
|
||||
virtual int protocol_send(const void*, int) override;
|
||||
virtual KResult protocol_connect(FileDescription&, ShouldBlock) override { return KSuccess; }
|
||||
virtual int protocol_allocate_local_port() override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue