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:
parent
1d66670ad7
commit
54b1d6f57f
7 changed files with 103 additions and 9 deletions
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue