Go to the documentation of this file.
33 typedef std::function<void(
const boost::system::error_code&)> ErrorCallback;
34 typedef std::function<void(
uint8*,
uint16)> RecvCallback;
39 SEND_BUFFER_SIZE = 65536,
40 RECV_BUFFER_SIZE = 65536
50 void connect(
const std::string& host,
uint16 port,
const std::function<
void()>& connectCallback);
54 void read(
uint16 bytes,
const RecvCallback& callback);
55 void read_until(
const std::string& what,
const RecvCallback& callback);
56 void read_some(
const RecvCallback& callback);
69 void internal_connect(asio::ip::basic_resolver<asio::ip::tcp>::iterator endpointIterator);
71 void onResolve(
const boost::system::error_code& error, asio::ip::tcp::resolver::iterator endpointIterator);
72 void onConnect(
const boost::system::error_code& error);
73 void onCanWrite(
const boost::system::error_code& error);
74 void onWrite(
const boost::system::error_code& error,
size_t writeSize, std::shared_ptr<asio::streambuf> outputStream);
75 void onRecv(
const boost::system::error_code& error,
size_t recvSize);
76 void onTimeout(
const boost::system::error_code& error);
77 void handleError(
const boost::system::error_code& error);
void onResolve(const boost::system::error_code &error, asio::ip::tcp::resolver::iterator endpointIterator)
boost::system::error_code m_error
std::function< void()> m_connectCallback
asio::deadline_timer m_readTimer
void handleError(const boost::system::error_code &error)
void read(uint16 bytes, const RecvCallback &callback)
asio::streambuf m_inputStream
ticks_t getElapsedTicksSinceLastRead()
static std::list< std::shared_ptr< asio::streambuf > > m_outputStreams
void onCanWrite(const boost::system::error_code &error)
asio::deadline_timer m_delayedWriteTimer
void onConnect(const boost::system::error_code &error)
void onWrite(const boost::system::error_code &error, size_t writeSize, std::shared_ptr< asio::streambuf > outputStream)
RecvCallback m_recvCallback
asio::ip::tcp::socket m_socket
void internal_connect(asio::ip::basic_resolver< asio::ip::tcp >::iterator endpointIterator)
boost::system::error_code getError()
void write(uint8 *buffer, size_t size)
void connect(const std::string &host, uint16 port, const std::function< void()> &connectCallback)
void read_until(const std::string &what, const RecvCallback &callback)
ConnectionPtr asConnection()
asio::ip::tcp::resolver m_resolver
ErrorCallback m_errorCallback
asio::deadline_timer m_writeTimer
std::shared_ptr< asio::streambuf > m_outputStream
stdext::timer m_activityTimer
void onTimeout(const boost::system::error_code &error)
void read_some(const RecvCallback &callback)
LuaObject, all script-able classes have it as base.
void setErrorCallback(const ErrorCallback &errorCallback)
void onRecv(const boost::system::error_code &error, size_t recvSize)