summaryrefslogtreecommitdiffstats
path: root/src/Common/Connection.cpp
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-05-06 17:39:30 +0200
committerMatthias Schiffer <matthias@gamezock.de>2009-05-06 17:39:30 +0200
commit8324b947487f72fd8cfc439ea5ae5bd1187fff1b (patch)
treee7fb69f3207654b5e3d4ba260d3f51082b1d399a /src/Common/Connection.cpp
parent5bf3e2229015d93808bb0c2f4729c2c4f4da414e (diff)
downloadmad-8324b947487f72fd8cfc439ea5ae5bd1187fff1b.tar
mad-8324b947487f72fd8cfc439ea5ae5bd1187fff1b.zip
Exception und ThreadHandler nach Net verschoben
Diffstat (limited to 'src/Common/Connection.cpp')
-rw-r--r--src/Common/Connection.cpp7
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));
}
}