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

Kernel: Tidy up UDPSocket creation a bit

- Rename create() => try_create()
- Use adopt_nonnull_ref_or_enomem()
This commit is contained in:
Andreas Kling 2021-09-04 23:04:06 +02:00
parent 648c768d81
commit 7d8e036e26
3 changed files with 7 additions and 10 deletions

View file

@ -14,7 +14,7 @@ namespace Kernel {
class UDPSocket final : public IPv4Socket {
public:
static KResultOr<NonnullRefPtr<UDPSocket>> create(int protocol, NonnullOwnPtr<DoubleBuffer> receive_buffer);
static KResultOr<NonnullRefPtr<UDPSocket>> try_create(int protocol, NonnullOwnPtr<DoubleBuffer> receive_buffer);
virtual ~UDPSocket() override;
static SocketHandle<UDPSocket> from_port(u16);