class tcp_connection : public nova_endpoint {
public:
using pointer = std::shared_ptr<tcp_connection>;
-#if BOOST_VERSION >= 107000
- using executor = boost::asio::executor;
-#else
- using executor = boost::asio::io_context::executor_type;
-#endif
+ using executor = tcp::socket::executor_type;
static pointer create(const executor& executor) { return pointer(new tcp_connection(executor)); }
bool operator==(tcp_connection const& rhs) const { return &rhs == this; }
private:
-#if BOOST_VERSION >= 107000
tcp_connection(const executor& executor): socket_(executor) {}
-#else
- tcp_connection(const executor& executor): socket_(executor.context()) {}
-#endif
void send(const char* data, size_t length) override final;