mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:57:44 +00:00
Kernel: Make TCPSocket client construction use KResultOr and TRY()
We don't really have anywhere to propagate the error in NetworkTask at the moment, since it runs in its own kernel thread and has no direct userspace caller.
This commit is contained in:
parent
ed5d04b0ea
commit
ededd6aac6
3 changed files with 10 additions and 14 deletions
|
@ -147,7 +147,7 @@ public:
|
|||
|
||||
static MutexProtected<HashMap<IPv4SocketTuple, RefPtr<TCPSocket>>>& closing_sockets();
|
||||
|
||||
RefPtr<TCPSocket> create_client(const IPv4Address& local_address, u16 local_port, const IPv4Address& peer_address, u16 peer_port);
|
||||
KResultOr<NonnullRefPtr<TCPSocket>> try_create_client(IPv4Address const& local_address, u16 local_port, IPv4Address const& peer_address, u16 peer_port);
|
||||
void set_originator(TCPSocket& originator) { m_originator = originator; }
|
||||
bool has_originator() { return !!m_originator; }
|
||||
void release_to_originator();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue