implementation connection handler for TCP
More...
#include <network.h>
|
| virtual void | write (const std::string &buffer) |
| | write async. to TCP socket (implement abstract) More...
|
| |
| virtual void | write (const std::vector< char > &buffer) |
| |
| virtual void | write (const boost::asio::mutable_buffers_1 &buffer) |
| | write async. to TCP socket More...
|
| |
|
| void | handle_read (const boost::system::error_code &error, size_t bytes_transferred) |
| | called on incoming data –> decides if an error occured or calls handler More...
|
| |
| void | handle_write (const boost::system::error_code &error) |
| | called if data is written (error handling) More...
|
| |
|
| typedef boost::signals2::signal< void(const char *data, const size_t size, Any_Session *writer)> | SIG_ON_DATA |
| | incoming data with "data" of size "size" and handler to write back ("writer") More...
|
| |
implementation connection handler for TCP
Definition at line 77 of file network.h.
| TCP_Session::TCP_Session |
( |
boost::asio::io_service & |
io_service, |
|
|
SIG_ON_DATA & |
cb |
|
) |
| |
|
inline |
| virtual TCP_Session::~TCP_Session |
( |
| ) |
|
|
inlinevirtual |
| virtual void TCP_Session::close |
( |
| ) |
|
|
inlinevirtual |
| virtual bool TCP_Session::connect |
( |
const std::string & |
path, |
|
|
const std::string & |
service |
|
) |
| |
|
inlinevirtual |
| virtual bool TCP_Session::connect |
( |
const boost::asio::ip::tcp::resolver::endpoint_type & |
ep | ) |
|
|
inlinevirtual |
| void TCP_Session::handle_read |
( |
const boost::system::error_code & |
error, |
|
|
size_t |
bytes_transferred |
|
) |
| |
|
inlineprivate |
called on incoming data –> decides if an error occured or calls handler
Definition at line 160 of file network.h.
| void TCP_Session::handle_write |
( |
const boost::system::error_code & |
error | ) |
|
|
inlineprivate |
called if data is written (error handling)
Definition at line 183 of file network.h.
| boost::asio::ip::tcp::socket& TCP_Session::socket |
( |
| ) |
|
|
inline |
getter for socket connection
Definition at line 90 of file network.h.
| virtual void TCP_Session::write |
( |
const std::string & |
buffer | ) |
|
|
inlineprotectedvirtual |
| virtual void TCP_Session::write |
( |
const std::vector< char > & |
buffer | ) |
|
|
inlineprotectedvirtual |
| virtual void TCP_Session::write |
( |
const boost::asio::mutable_buffers_1 & |
buffer | ) |
|
|
inlineprotectedvirtual |
write async. to TCP socket
Definition at line 150 of file network.h.
data buffer of max. length
Definition at line 197 of file network.h.
| boost::mutex TCP_Session::mtx_ |
|
protected |
| boost::asio::ip::tcp::socket TCP_Session::socket_ |
|
protected |
The documentation for this class was generated from the following file: