tcpServer.h
Go to the documentation of this file.
27 boost::function<void(const boost::system::error_code& error, const char* receiveData, std::string& sendData)> mReceiveSendHandler;
28 boost::function<void(const boost::system::error_code& error, std::size_t size)> mWriteStatusHandler;
100 void setWriteStatusHandler(boost::function<void(const boost::system::error_code& error, std::size_t size)> writeStatusHandler);
105 void setReceiveSendHandler(boost::function<void(const boost::system::error_code& error, const char* receiveData, std::string& sendData)> receiveSendHandler);
121 boost::function<void(const boost::system::error_code& error, const char* receiveData, std::string& sendData)> mReceiveSendHandler;
122 boost::function<void(const boost::system::error_code& error, std::size_t size)> mWriteStatusHandler;
130 void handleAccept(const boost::system::error_code& error, boost::shared_ptr<TcpConnection> new_connection);
178 void setWriteStatusHandler(boost::function<void(const boost::system::error_code& error, std::size_t size)> writeStatusHandler);
183 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:58
Connection class, responsible of send/receive data from any client or server. Regardless its communic...
Definition: tcpServer.h:24
static pointer create(boost::asio::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:65
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:114
void write(std::string sendData)
Function responsible of send the data through the socket.