19 #include <boost/asio.hpp>
39 std::function<
void(
const boost::system::error_code&, std::size_t)> handler) = 0;
41 std::function<
void(
const boost::system::error_code&, std::size_t)> handler) = 0;
42 virtual void shutdown(net::ip::tcp::socket::shutdown_type what, boost::system::error_code& ec) = 0;
43 virtual void close(boost::system::error_code& ec) = 0;
44 virtual net::ip::tcp::endpoint
remote_endpoint(boost::system::error_code& ec)
const = 0;
An interface abstracting Boost.Asio's tcp::socket for testability. This is an internal interface used...
virtual net::ip::tcp::endpoint remote_endpoint(boost::system::error_code &ec) const =0
virtual void shutdown(net::ip::tcp::socket::shutdown_type what, boost::system::error_code &ec)=0
virtual void async_write(const net::const_buffer &buffer, std::function< void(const boost::system::error_code &, std::size_t)> handler)=0
virtual void async_read_some(const net::mutable_buffer &buffer, std::function< void(const boost::system::error_code &, std::size_t)> handler)=0
virtual ~TcpSocketInterface()=default
virtual void close(boost::system::error_code &ec)=0