unilink  0.4.3
A simple C++ library for unified async communication
unilink::transport::BoostTcpSocket Class Reference

Boost.Asio implementation of ITcpSocket interface. This is the real implementation used in production. More...

#include <boost_tcp_socket.hpp>

Inheritance diagram for unilink::transport::BoostTcpSocket:
unilink::interface::TcpSocketInterface

Public Member Functions

 BoostTcpSocket (tcp::socket sock)
 
 ~BoostTcpSocket () override=default
 
void async_read_some (const net::mutable_buffer &buffer, std::function< void(const boost::system::error_code &, std::size_t)> handler) override
 
void async_write (const net::const_buffer &buffer, std::function< void(const boost::system::error_code &, std::size_t)> handler) override
 
void shutdown (tcp::socket::shutdown_type what, boost::system::error_code &ec) override
 
void close (boost::system::error_code &ec) override
 
tcp::endpoint remote_endpoint (boost::system::error_code &ec) const override
 

Detailed Description

Boost.Asio implementation of ITcpSocket interface. This is the real implementation used in production.

Definition at line 36 of file boost_tcp_socket.hpp.

Constructor & Destructor Documentation

◆ BoostTcpSocket()

unilink::transport::BoostTcpSocket::BoostTcpSocket ( tcp::socket  sock)
explicit

Definition at line 30 of file boost_tcp_socket.cc.

◆ ~BoostTcpSocket()

unilink::transport::BoostTcpSocket::~BoostTcpSocket ( )
overridedefault

Member Function Documentation

◆ async_read_some()

void unilink::transport::BoostTcpSocket::async_read_some ( const net::mutable_buffer &  buffer,
std::function< void(const boost::system::error_code &, std::size_t)>  handler 
)
overridevirtual

Implements unilink::interface::TcpSocketInterface.

Definition at line 37 of file boost_tcp_socket.cc.

◆ async_write()

void unilink::transport::BoostTcpSocket::async_write ( const net::const_buffer &  buffer,
std::function< void(const boost::system::error_code &, std::size_t)>  handler 
)
overridevirtual

Implements unilink::interface::TcpSocketInterface.

Definition at line 42 of file boost_tcp_socket.cc.

◆ close()

void unilink::transport::BoostTcpSocket::close ( boost::system::error_code &  ec)
overridevirtual

Implements unilink::interface::TcpSocketInterface.

Definition at line 51 of file boost_tcp_socket.cc.

◆ remote_endpoint()

tcp::endpoint unilink::transport::BoostTcpSocket::remote_endpoint ( boost::system::error_code &  ec) const
overridevirtual

Implements unilink::interface::TcpSocketInterface.

Definition at line 53 of file boost_tcp_socket.cc.

◆ shutdown()

void unilink::transport::BoostTcpSocket::shutdown ( tcp::socket::shutdown_type  what,
boost::system::error_code &  ec 
)
override

Definition at line 47 of file boost_tcp_socket.cc.


The documentation for this class was generated from the following files: