1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 00:57:45 +00:00

Kernel: More sockets work. Fleshing out accept().

This commit is contained in:
Andreas Kling 2019-02-14 15:17:30 +01:00
parent 1d66670ad7
commit 54b1d6f57f
7 changed files with 103 additions and 9 deletions

View file

@ -3,16 +3,24 @@
#include <Kernel/Socket.h>
#include <Kernel/DoubleBuffer.h>
class FileDescriptor;
class LocalSocket final : public Socket {
public:
static RetainPtr<LocalSocket> create(int type);
virtual ~LocalSocket() override;
virtual bool bind(const sockaddr*, socklen_t, int& error) override;
virtual bool get_address(sockaddr*, socklen_t*) override;
private:
explicit LocalSocket(int type);
RetainPtr<FileDescriptor> m_file;
bool m_bound { false };
sockaddr_un m_address;
DoubleBuffer m_for_client;
DoubleBuffer m_for_server;
};