34 using key_type = std::string;
41 const std::string& key()
const{
49 explicit tcp(info_type info);
53 tcp(asio::ip::tcp::socket socket, std::string key);
72 inline std::string
desc()
const{
73 return std::format(
"tcp socket (<{}> to {}:{})",info_.
name,info_.
address,info_.
port);
79 asio::ip::tcp::socket socket_;
82 std::array<std::byte,1024> buffer_;
83 bool started_ {
false};
84 std::function<void()> on_close_;
85 bool closed_notified_ {
false};