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:
parent
2341b0159a
commit
dfdb52efa7
11 changed files with 263 additions and 124 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue