feat(echo): add echo client and server with CLI support

This commit is contained in:
Ваше Имя
2025-10-04 20:28:19 +04:00
parent a4c84379ff
commit 75563091c1
13 changed files with 314 additions and 9 deletions
+24
View File
@@ -0,0 +1,24 @@
#pragma once
#include "aliases.hpp"
#include "logger.hpp"
#include <string>
class EchoClient final
{
public:
EchoClient(IoContext &io, std::string host, unsigned short port);
bool run(const std::string &message);
private:
bool connect();
bool send(const std::string &message);
void close();
private:
IoContext &io_;
std::string host_;
unsigned short port_;
TcpSocket socket_{io_};
};