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

LibCore+Userland: Convert TCPServer to use the Serenity Stream API

This is intended as a real-usecase test of the Serenity Stream API, and
seemed like a good candidate due to its low amount of users.
This commit is contained in:
sin-ack 2021-09-12 11:55:40 +00:00 committed by Ali Mohammad Pur
parent 2341b0159a
commit dfdb52efa7
11 changed files with 263 additions and 124 deletions

View file

@ -9,6 +9,7 @@
#include <AK/IPv4Address.h>
#include <LibCore/Notifier.h>
#include <LibCore/Object.h>
#include <LibCore/Stream.h>
namespace Core {
@ -21,7 +22,7 @@ public:
bool listen(const IPv4Address& address, u16 port);
void set_blocking(bool blocking);
RefPtr<TCPSocket> accept();
ErrorOr<Stream::TCPSocket> accept();
Optional<IPv4Address> local_address() const;
Optional<u16> local_port() const;