1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-02 23:42:13 +00:00

Net: Make NetworkAdapter reference-counted

The idea behind WeakPtr<NetworkAdapter> was to support hot-pluggable
network adapters, but on closer thought, that's super impractical so
let's not go down that road.
This commit is contained in:
Andreas Kling 2020-02-08 00:19:46 +01:00
parent f3a5985bb2
commit a3f39fe789
7 changed files with 19 additions and 19 deletions

View file

@ -182,7 +182,7 @@ private:
HashMap<IPv4SocketTuple, NonnullRefPtr<TCPSocket>> m_pending_release_for_accept;
Direction m_direction { Direction::Unspecified };
Error m_error { Error::None };
WeakPtr<NetworkAdapter> m_adapter;
RefPtr<NetworkAdapter> m_adapter;
u32 m_sequence_number { 0 };
u32 m_ack_number { 0 };
State m_state { State::Closed };