mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 22:38:51 +00:00
Kernel: Add on_receive callback to NetworkAdapter
This commit is contained in:
parent
682fe48222
commit
36d349f7a7
Notes:
sideshowbarker
2024-07-19 12:27:50 +09:00
Author: https://github.com/deoxxa
Commit: 36d349f7a7
Pull-request: https://github.com/SerenityOS/serenity/pull/499
Reviewed-by: https://github.com/awesomekling
2 changed files with 5 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue