add ReadableConnection interface

This commit is contained in:
MihailRis 2025-10-06 01:49:13 +03:00
parent 80cd187c6f
commit 44bf4a2f9e
3 changed files with 9 additions and 4 deletions

View file

@ -3,13 +3,12 @@
#include "commons.hpp"
namespace network {
class TcpConnection : public Connection {
class TcpConnection : public ReadableConnection {
public:
~TcpConnection() override = default;
virtual void connect(runnable callback) = 0;
virtual int recv(char* buffer, size_t length) = 0;
virtual int available() = 0;
virtual void setNoDelay(bool noDelay) = 0;
[[nodiscard]] virtual bool isNoDelay() const = 0;