1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:47:46 +00:00

Kernel: Remove the Socket::{protocol,}connect ShouldBlock argument

This argument is always set to description.is_blocking(), but
description is also given as a separate argument, so there's no point
to piping it through separately.
This commit is contained in:
Idan Horowitz 2022-07-13 09:31:24 +03:00 committed by Andreas Kling
parent 2aaaee6744
commit 364f6a9bf0
10 changed files with 13 additions and 18 deletions

View file

@ -33,7 +33,7 @@ public:
virtual ErrorOr<void> close() override;
virtual ErrorOr<void> bind(Userspace<sockaddr const*>, socklen_t) override;
virtual ErrorOr<void> connect(OpenFileDescription&, Userspace<sockaddr const*>, socklen_t, ShouldBlock = ShouldBlock::Yes) override;
virtual ErrorOr<void> connect(OpenFileDescription&, Userspace<sockaddr const*>, socklen_t) override;
virtual ErrorOr<void> listen(size_t) override;
virtual void get_local_address(sockaddr*, socklen_t*) override;
virtual void get_peer_address(sockaddr*, socklen_t*) override;
@ -82,7 +82,7 @@ protected:
virtual ErrorOr<void> protocol_listen([[maybe_unused]] bool did_allocate_port) { return {}; }
virtual ErrorOr<size_t> protocol_receive(ReadonlyBytes /* raw_ipv4_packet */, UserOrKernelBuffer&, size_t, int) { return ENOTIMPL; }
virtual ErrorOr<size_t> protocol_send(UserOrKernelBuffer const&, size_t) { return ENOTIMPL; }
virtual ErrorOr<void> protocol_connect(OpenFileDescription&, ShouldBlock) { return {}; }
virtual ErrorOr<void> protocol_connect(OpenFileDescription&) { return {}; }
virtual ErrorOr<u16> protocol_allocate_local_port() { return ENOPROTOOPT; }
virtual ErrorOr<size_t> protocol_size(ReadonlyBytes /* raw_ipv4_packet */) { return ENOTIMPL; }
virtual bool protocol_is_disconnected() const { return false; }