mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:28:12 +00:00
Kernel: Add UDPSocket::try_for_each() for fallible iteration
This API will allow users to short circuit iteration and properly propagate errors.
This commit is contained in:
parent
aabc8d348b
commit
6682afb5d4
2 changed files with 10 additions and 0 deletions
|
@ -19,6 +19,7 @@ public:
|
|||
|
||||
static RefPtr<UDPSocket> from_port(u16);
|
||||
static void for_each(Function<void(const UDPSocket&)>);
|
||||
static ErrorOr<void> try_for_each(Function<ErrorOr<void>(const UDPSocket&)>);
|
||||
|
||||
private:
|
||||
explicit UDPSocket(int protocol, NonnullOwnPtr<DoubleBuffer> receive_buffer);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue