mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-05-24 12:08:57 +00:00
Kernel: Add on_receive callback to NetworkAdapter
This commit is contained in:
committed by
Andreas Kling
parent
682fe48222
commit
36d349f7a7
@@ -88,6 +88,8 @@ void NetworkAdapter::did_receive(const u8* data, int length)
|
||||
m_packets_in++;
|
||||
m_bytes_in += length;
|
||||
m_packet_queue.append(KBuffer::copy(data, length));
|
||||
if (m_on_receive)
|
||||
m_on_receive();
|
||||
}
|
||||
|
||||
Optional<KBuffer> NetworkAdapter::dequeue_packet()
|
||||
|
||||
Reference in New Issue
Block a user