tcpServer.h
Go to the documentation of this file.
29 boost::function<void(const boost::system::error_code& error, const char* receiveData, std::string& sendData)> mReceiveSendHandler;
30 boost::function<void(const boost::system::error_code& error, std::size_t size)> mWriteStatusHandler;
102 void setWriteStatusHandler(boost::function<void(const boost::system::error_code& error, std::size_t size)> writeStatusHandler);
107 void setReceiveSendHandler(boost::function<void(const boost::system::error_code& error, const char* receiveData, std::string& sendData)> receiveSendHandler);
123 boost::function<void(const boost::system::error_code& error, const char* receiveData, std::string& sendData)> mReceiveSendHandler;
124 boost::function<void(const boost::system::error_code& error, std::size_t size)> mWriteStatusHandler;
132 void handleAccept(const boost::system::error_code& error, boost::shared_ptr<TcpConnection> new_connection);
180 void setWriteStatusHandler(boost::function<void(const boost::system::error_code& error, std::size_t size)> writeStatusHandler);
185 void setReceiveSendHandler(boost::function<void(const boost::system::error_code& error, const char* receiveData, std::string& sendData)> receiveSendHandler);
void setWriteStatusHandler(boost::function< void(const boost::system::error_code &error, std::size_t size)> writeStatusHandler)
To set the write handler.
boost::shared_ptr< TcpConnection > pointer
Pointer to TCP connection.
Definition: tcpServer.h:60
Connection class, responsible of send/receive data from any client or server. Regardless its communic...
Definition: tcpServer.h:26
void setReceiveSendHandler(boost::function< void(const boost::system::error_code &error, const char *receiveData, std::string &sendData)> receiveSendHandler)
To set the read handler.
TCP Server Class that allows to create a server to interact with send and receive operations...
Definition: tcpServer.h:116
void write(std::string sendData)
Function responsible of send the data through the socket.
static pointer create(BOOST_IO_CONTEXT &io_context)
Static function to create the boost share object of Connection related to an io context. It is one way to hide the Connection class only available for Server class.
Definition: tcpServer.h:67