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

Kernel: Make UDPSocket::create() API OOM safe

This commit is contained in:
Brian Gianforcaro 2021-05-13 01:34:04 -07:00 committed by Andreas Kling
parent 858fff979a
commit 2e34714ba1
3 changed files with 13 additions and 5 deletions

View file

@ -6,13 +6,14 @@
#pragma once
#include <Kernel/KResult.h>
#include <Kernel/Net/IPv4Socket.h>
namespace Kernel {
class UDPSocket final : public IPv4Socket {
public:
static NonnullRefPtr<UDPSocket> create(int protocol);
static KResultOr<NonnullRefPtr<UDPSocket>> create(int protocol);
virtual ~UDPSocket() override;
static SocketHandle<UDPSocket> from_port(u16);