1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:08:10 +00:00

LibCore: Move GIODevice hierarchy from LibGUI to LibCore.

This commit is contained in:
Andreas Kling 2019-04-10 20:22:23 +02:00
parent fc1d3074de
commit cfd6e6cc36
19 changed files with 112 additions and 112 deletions

19
LibCore/CTCPSocket.cpp Normal file
View file

@ -0,0 +1,19 @@
#include <LibCore/CTCPSocket.h>
#include <sys/socket.h>
CTCPSocket::CTCPSocket(CObject* parent)
: CSocket(CSocket::Type::TCP, parent)
{
int fd = socket(AF_INET, SOCK_STREAM | SOCK_NONBLOCK, 0);
if (fd < 0) {
set_error(fd);
} else {
set_fd(fd);
set_mode(CIODevice::ReadWrite);
set_error(0);
}
}
CTCPSocket::~CTCPSocket()
{
}