1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 13:25:08 +00:00
serenity/Kernel/Socket.cpp
2019-02-14 14:17:38 +01:00

29 lines
533 B
C++

#include <Kernel/Socket.h>
#include <Kernel/LocalSocket.h>
#include <Kernel/UnixTypes.h>
#include <LibC/errno_numbers.h>
RetainPtr<Socket> Socket::create(int domain, int type, int protocol, int& error)
{
(void)protocol;
switch (domain) {
case AF_LOCAL:
return LocalSocket::create(type);
default:
error = EAFNOSUPPORT;
return nullptr;
}
}
Socket::Socket(int domain, int type, int protocol)
: m_domain(domain)
, m_type(type)
, m_protocol(protocol)
{
}
Socket::~Socket()
{
}