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:
parent
858fff979a
commit
2e34714ba1
3 changed files with 13 additions and 5 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue