Place new send code in a separate class, and use it also for the chat cleaner communication. Data class "encoded packet" is no longer used, it was overhead.
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
#include <net/chatcleanercallback.h>
|
||||
#include <net/internalchatcleanerpacket.h>
|
||||
|
||||
class EncodedPacket;
|
||||
class SendDataManager;
|
||||
|
||||
class ChatCleanerManager : public boost::enable_shared_from_this<ChatCleanerManager>
|
||||
{
|
||||
@@ -45,7 +45,6 @@ protected:
|
||||
|
||||
void HandleResolve(const boost::system::error_code& ec, boost::asio::ip::tcp::resolver::iterator endpoint_iterator);
|
||||
void HandleConnect(const boost::system::error_code& ec, boost::asio::ip::tcp::resolver::iterator endpoint_iterator);
|
||||
void HandleWrite(const boost::system::error_code &ec, boost::shared_ptr<EncodedPacket> tmpPacket);
|
||||
void HandleRead(const boost::system::error_code &ec, size_t bytesRead);
|
||||
bool HandleMessage(InternalChatCleanerPacket &msg);
|
||||
|
||||
@@ -58,6 +57,7 @@ private:
|
||||
boost::shared_ptr<boost::asio::io_service> m_ioService;
|
||||
boost::shared_ptr<boost::asio::ip::tcp::resolver> m_resolver;
|
||||
boost::shared_ptr<boost::asio::ip::tcp::socket> m_socket;
|
||||
boost::shared_ptr<SendDataManager> m_sendManager;
|
||||
|
||||
bool m_connected;
|
||||
unsigned m_curRequestId;
|
||||
|
||||
Reference in New Issue
Block a user