mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 21:48:13 +00:00
Kernel: Allow Socket subclasses to fail construction
For example, socket(AF_INET) should only succeed for valid SOCK_TYPEs.
This commit is contained in:
parent
a93f35ac71
commit
03d73cbaae
5 changed files with 7 additions and 6 deletions
|
@ -41,7 +41,7 @@ class TCPSocket;
|
|||
|
||||
class IPv4Socket : public Socket {
|
||||
public:
|
||||
static NonnullRefPtr<IPv4Socket> create(int type, int protocol);
|
||||
static KResultOr<NonnullRefPtr<Socket>> create(int type, int protocol);
|
||||
virtual ~IPv4Socket() override;
|
||||
|
||||
static Lockable<HashTable<IPv4Socket*>>& all_sockets();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue