#include <connection.h>
Public Member Functions | |
ConnectionTcp (const std::string &ip, const uint16_t port) | |
void | send (const std::string &data, CallbackSend cb=CallbackSend()) |
void | spin () |
void | startWatchdog (const boost::posix_time::time_duration &duration) |
void | stop () |
Protected Member Functions | |
void | asyncRead () |
void | clearWatchdog () |
void | onConnect (const boost::system::error_code &error) |
void | onConnectTimeout (const boost::system::error_code &error) |
void | onReceive (const boost::system::error_code &error) |
void | onSend (const boost::system::error_code &error, CallbackSend cb) |
void | onWatchdog (const boost::system::error_code &error) |
Protected Attributes | |
boost::asio::streambuf | buf_ |
boost::asio::io_service | io_ |
boost::asio::ip::tcp::socket | socket_ |
boost::asio::deadline_timer | timeout_ |
boost::asio::deadline_timer | watchdog_ |
boost::posix_time::time_duration | watchdog_duration_ |
Definition at line 87 of file connection.h.
scip2::ConnectionTcp::ConnectionTcp | ( | const std::string & | ip, |
const uint16_t | port | ||
) | [inline] |
Definition at line 173 of file connection.h.
void scip2::ConnectionTcp::asyncRead | ( | ) | [inline, protected] |
Definition at line 142 of file connection.h.
void scip2::ConnectionTcp::clearWatchdog | ( | ) | [inline, protected] |
Definition at line 97 of file connection.h.
void scip2::ConnectionTcp::onConnect | ( | const boost::system::error_code & | error | ) | [inline, protected] |
Definition at line 148 of file connection.h.
void scip2::ConnectionTcp::onConnectTimeout | ( | const boost::system::error_code & | error | ) | [inline, protected] |
Definition at line 160 of file connection.h.
void scip2::ConnectionTcp::onReceive | ( | const boost::system::error_code & | error | ) | [inline, protected] |
Definition at line 116 of file connection.h.
void scip2::ConnectionTcp::onSend | ( | const boost::system::error_code & | error, |
CallbackSend | cb | ||
) | [inline, protected] |
Definition at line 129 of file connection.h.
void scip2::ConnectionTcp::onWatchdog | ( | const boost::system::error_code & | error | ) | [inline, protected] |
Definition at line 107 of file connection.h.
void scip2::ConnectionTcp::send | ( | const std::string & | data, |
CallbackSend | cb = CallbackSend() |
||
) | [inline, virtual] |
Implements scip2::Connection.
Definition at line 200 of file connection.h.
void scip2::ConnectionTcp::spin | ( | ) | [inline, virtual] |
Implements scip2::Connection.
Definition at line 192 of file connection.h.
void scip2::ConnectionTcp::startWatchdog | ( | const boost::posix_time::time_duration & | duration | ) | [inline, virtual] |
Implements scip2::Connection.
Definition at line 209 of file connection.h.
void scip2::ConnectionTcp::stop | ( | ) | [inline, virtual] |
Implements scip2::Connection.
Definition at line 196 of file connection.h.
boost::asio::streambuf scip2::ConnectionTcp::buf_ [protected] |
Definition at line 92 of file connection.h.
boost::asio::io_service scip2::ConnectionTcp::io_ [protected] |
Definition at line 90 of file connection.h.
boost::asio::ip::tcp::socket scip2::ConnectionTcp::socket_ [protected] |
Definition at line 91 of file connection.h.
boost::asio::deadline_timer scip2::ConnectionTcp::timeout_ [protected] |
Definition at line 93 of file connection.h.
boost::asio::deadline_timer scip2::ConnectionTcp::watchdog_ [protected] |
Definition at line 94 of file connection.h.
boost::posix_time::time_duration scip2::ConnectionTcp::watchdog_duration_ [protected] |
Definition at line 95 of file connection.h.