mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:58:12 +00:00
Kernel: Use WeakPtr<NetworkAdapter> instead of NetworkAdapter* in net code
This commit is contained in:
parent
d6bce37756
commit
54ceabd48d
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