26#ifndef ROUTER_CONNECTION_POOL_CONNECTION_BASE_INCLUDED
27#define ROUTER_CONNECTION_POOL_CONNECTION_BASE_INCLUDED
31#include <system_error>
47 std::vector<uint8_t, default_init_allocator<uint8_t>>;
53 std::function<
void(std::error_code ec,
size_t transferred)>) = 0;
57 std::function<
void(std::error_code ec,
size_t transferred)>) = 0;
63 [[nodiscard]]
virtual bool is_open()
const = 0;
72 [[nodiscard]]
virtual std::string
endpoint()
const = 0;
virtual base-class of BasicConnection.
Definition: connection_base.h:42
virtual void async_send(recv_buffer_type &, std::function< void(std::error_code ec, size_t transferred)>)=0
std::vector< uint8_t, default_init_allocator< uint8_t > > recv_buffer_type
Definition: connection_base.h:47
virtual void async_wait_recv(std::function< void(std::error_code ec)>)=0
virtual stdx::expected< void, std::error_code > close()=0
virtual void async_recv(recv_buffer_type &, std::function< void(std::error_code ec, size_t transferred)>)=0
virtual void async_wait_send(std::function< void(std::error_code ec)>)=0
virtual bool is_secure_transport() const =0
virtual net::impl::socket::native_handle_type native_handle() const =0
virtual net::io_context & io_ctx()=0
virtual std::string endpoint() const =0
virtual bool is_open() const =0
virtual stdx::expected< void, std::error_code > shutdown(net::socket_base::shutdown_type st)=0
virtual stdx::expected< void, std::error_code > cancel()=0
virtual stdx::expected< void, std::error_code > set_io_context(net::io_context &new_ctx)=0
virtual void async_wait_error(std::function< void(std::error_code ec)>)=0
virtual ~ConnectionBase()=default
Definition: io_context.h:61
shutdown_type
Definition: socket.h:172
Definition: expected.h:944
int native_handle_type
Definition: socket_constants.h:51