summaryrefslogtreecommitdiffstats
path: root/src/Net/Connection.h
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2008-06-12 22:08:16 +0200
committerMatthias Schiffer <matthias@gamezock.de>2008-06-12 22:08:16 +0200
commit09e0fc185219e9e625baf096a68a221be55e0284 (patch)
treeca9f6cb1d54de72b50879a0a86378bdaf29e36d0 /src/Net/Connection.h
parentd2969d6f715949521e49a9b99c947ada86b1b49f (diff)
downloadmad-09e0fc185219e9e625baf096a68a221be55e0284.tar
mad-09e0fc185219e9e625baf096a68a221be55e0284.zip
Signalisiere empfangende Pakete.
Diffstat (limited to 'src/Net/Connection.h')
-rw-r--r--src/Net/Connection.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Net/Connection.h b/src/Net/Connection.h
index 80b721f..f48ef20 100644
--- a/src/Net/Connection.h
+++ b/src/Net/Connection.h
@@ -21,6 +21,7 @@
#define MAD_NET_CONNECTION_H_
#include <gnutls/gnutls.h>
+#include <sigc++/signal.h>
#include "Packet.h"
namespace Mad {
@@ -36,6 +37,8 @@ class Connection {
unsigned long read;
+ sigc::signal<void,const Connection*,const Packet&> signal;
+
protected:
virtual gnutls_session_t& getSession() = 0;
@@ -51,6 +54,8 @@ class Connection {
bool send(const Packet &packet);
bool recieve();
+ sigc::signal<void,const Connection*,const Packet&> signalRecieve() const {return signal;}
+
static void init() {
gnutls_global_init();
}