summaryrefslogtreecommitdiffstats
path: root/src/Net
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2008-09-14 23:16:58 +0200
committerMatthias Schiffer <matthias@gamezock.de>2008-09-14 23:16:58 +0200
commit082dac7a8cb39ec1b005680680c4f3e1e8ddc256 (patch)
tree1db7b02d84cdd1882e15d3a1abfd8e93925a4af6 /src/Net
parentfd9b1506a3b3858235e91cce45805f6d54caae4f (diff)
downloadmad-082dac7a8cb39ec1b005680680c4f3e1e8ddc256.tar
mad-082dac7a8cb39ec1b005680680c4f3e1e8ddc256.zip
Verwende statische Instanzen von ConfigManager, ConnectionManager und RequestManager (Singleton)
Diffstat (limited to 'src/Net')
-rw-r--r--src/Net/Connection.cpp1
-rw-r--r--src/Net/Connection.h8
2 files changed, 8 insertions, 1 deletions
diff --git a/src/Net/Connection.cpp b/src/Net/Connection.cpp
index da1ff3f..22f4570 100644
--- a/src/Net/Connection.cpp
+++ b/src/Net/Connection.cpp
@@ -281,6 +281,7 @@ void Connection::doDisconnect() {
peer = 0;
authenticated = false;
+ name.clear();
state = DISCONNECTED;
}
diff --git a/src/Net/Connection.h b/src/Net/Connection.h
index 58e7291..953ccc8 100644
--- a/src/Net/Connection.h
+++ b/src/Net/Connection.h
@@ -20,11 +20,13 @@
#ifndef MAD_NET_CONNECTION_H_
#define MAD_NET_CONNECTION_H_
+#include "Packet.h"
+
#include <queue>
+#include <string>
#include <gnutls/gnutls.h>
#include <sigc++/signal.h>
#include <poll.h>
-#include "Packet.h"
namespace Mad {
namespace Net {
@@ -55,6 +57,7 @@ class Connection {
sigc::signal<void,Connection*,const Packet&> signal;
bool authenticated;
+ std::string name;
void doHandshake();
@@ -152,6 +155,9 @@ class Connection {
sigc::signal<void,Connection*,const Packet&> signalReceive() const {return signal;}
+ std::string getName() const {return name;}
+ void setName(const std::string& name0) {name = name0;}
+
static void init() {
gnutls_global_init();
}