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
commit 7d8e036e26
Notes: sideshowbarker 2024-07-18 04:44:44 +09:00
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);