mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibCore: Add CTCPServer
This is pretty much a find/replace copy of CLocalServer, and some modifications to CTCPSocket and CSocketAddress to support it.
This commit is contained in:
parent
79e22acb22
commit
ed66f1d6d4
Notes:
sideshowbarker
2024-07-19 12:52:42 +09:00
Author: https://github.com/deoxxa
Commit: ed66f1d6d4
Pull-request: https://github.com/SerenityOS/serenity/pull/408
6 changed files with 118 additions and 1 deletions
|
@ -1,5 +1,14 @@
|
|||
#include <LibCore/CTCPSocket.h>
|
||||
#include <sys/socket.h>
|
||||
#include <errno.h>
|
||||
|
||||
CTCPSocket::CTCPSocket(Badge<CTCPServer>, int fd, CObject* parent)
|
||||
: CSocket(CSocket::Type::TCP, parent)
|
||||
{
|
||||
set_fd(fd);
|
||||
set_mode(CIODevice::ReadWrite);
|
||||
set_error(0);
|
||||
}
|
||||
|
||||
CTCPSocket::CTCPSocket(CObject* parent)
|
||||
: CSocket(CSocket::Type::TCP, parent)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue