diff options
Diffstat (limited to 'src/Common/Connection.cpp')
-rw-r--r-- | src/Common/Connection.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Common/Connection.cpp b/src/Common/Connection.cpp index b4e5db4..cde3fc2 100644 --- a/src/Common/Connection.cpp +++ b/src/Common/Connection.cpp @@ -20,16 +20,19 @@ #include "Connection.h" #include "XmlPacket.h" +#include <sigc++/bind.h> namespace Mad { namespace Common { void Connection::receive(const Net::Packet &packet) { + // receive() will be called by FdManager (main thread) + // -> let the ThreadManager call the handler in the worker thread signal(XmlPacket(packet), packet.getRequestId()); } -bool Connection::sendPacket(const XmlPacket &packet, uint16_t requestId) { - return send(packet.encode(requestId)); +void Connection::sendPacket(const XmlPacket &packet, uint16_t requestId) { + send(packet.encode(requestId)); } } |