mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +00:00
Kernel: Use WeakPtr<NetworkAdapter> instead of NetworkAdapter* in net code
This commit is contained in:
parent
d6bce37756
commit
54ceabd48d
Notes:
sideshowbarker
2024-07-19 12:48:48 +09:00
Author: https://github.com/deoxxa
Commit: 54ceabd48d
Pull-request: https://github.com/SerenityOS/serenity/pull/421
Reviewed-by: https://github.com/awesomekling ✅
9 changed files with 28 additions and 16 deletions
|
@ -1,6 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/Function.h>
|
||||
#include <AK/WeakPtr.h>
|
||||
#include <Kernel/Net/IPv4Socket.h>
|
||||
|
||||
class TCPSocket final : public IPv4Socket {
|
||||
|
@ -86,7 +87,7 @@ private:
|
|||
virtual KResult protocol_bind() override;
|
||||
virtual KResult protocol_listen() override;
|
||||
|
||||
NetworkAdapter* m_adapter { nullptr };
|
||||
WeakPtr<NetworkAdapter> m_adapter;
|
||||
u32 m_sequence_number { 0 };
|
||||
u32 m_ack_number { 0 };
|
||||
State m_state { State::Closed };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue