mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-10 10:09:14 +00:00
Kernel: Use RefPtr instead of SocketHandle for TCPSocket clients
Using a SocketHandle takes a lock on the socket, which we don't want to do.
This commit is contained in:
parent
cfcb53fe77
commit
d53c9d4416
Notes:
sideshowbarker
2024-07-19 12:12:28 +09:00
Author: https://github.com/deoxxa
Commit: d53c9d4416
Pull-request: https://github.com/SerenityOS/serenity/pull/530
Reviewed-by: https://github.com/awesomekling
2 changed files with 6 additions and 6 deletions
|
@ -122,10 +122,10 @@ public:
|
|||
void record_incoming_data(int);
|
||||
|
||||
static Lockable<HashMap<IPv4SocketTuple, TCPSocket*>>& sockets_by_tuple();
|
||||
static SocketHandle<TCPSocket> from_tuple(const IPv4SocketTuple& tuple);
|
||||
static SocketHandle<TCPSocket> from_endpoints(const IPv4Address& local_address, u16 local_port, const IPv4Address& peer_address, u16 peer_port);
|
||||
static RefPtr<TCPSocket> from_tuple(const IPv4SocketTuple& tuple);
|
||||
static RefPtr<TCPSocket> from_endpoints(const IPv4Address& local_address, u16 local_port, const IPv4Address& peer_address, u16 peer_port);
|
||||
|
||||
SocketHandle<TCPSocket> create_client(const IPv4Address& local_address, u16 local_port, const IPv4Address& peer_address, u16 peer_port);
|
||||
RefPtr<TCPSocket> create_client(const IPv4Address& local_address, u16 local_port, const IPv4Address& peer_address, u16 peer_port);
|
||||
|
||||
protected:
|
||||
void set_direction(Direction direction) { m_direction = direction; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue