summaryrefslogtreecommitdiffstats
path: root/src/Net/Connection.h
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2008-09-15 02:19:06 +0200
committerMatthias Schiffer <matthias@gamezock.de>2008-09-15 02:19:06 +0200
commitfbe26b0e48e6f3714900833174fcf42196e86fc8 (patch)
tree0f9528f2ad25c50e55a13e6fd60bf545f48ebf88 /src/Net/Connection.h
parent082dac7a8cb39ec1b005680680c4f3e1e8ddc256 (diff)
downloadmad-fbe26b0e48e6f3714900833174fcf42196e86fc8.tar
mad-fbe26b0e48e6f3714900833174fcf42196e86fc8.zip
Identifikationsinformationen im ConnectionManager speichern
Diffstat (limited to 'src/Net/Connection.h')
-rw-r--r--src/Net/Connection.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/Net/Connection.h b/src/Net/Connection.h
index 953ccc8..77b8cc4 100644
--- a/src/Net/Connection.h
+++ b/src/Net/Connection.h
@@ -56,9 +56,6 @@ class Connection {
sigc::signal<void,Connection*,const Packet&> signal;
- bool authenticated;
- std::string name;
-
void doHandshake();
void packetHeaderReceiveHandler(const void *data, unsigned long length);
@@ -99,6 +96,7 @@ class Connection {
gnutls_certificate_credentials_t x509_cred;
IPAddress *peer;
+ bool authenticated, identified;
void handshake();
@@ -110,7 +108,7 @@ class Connection {
bool enterReceiveLoop();
public:
- Connection() : state(DISCONNECTED), authenticated(false), peer(0) {
+ Connection() : state(DISCONNECTED), peer(0), authenticated(false), identified(false) {
transR.length = transR.transmitted = 0;
transR.data = 0;
@@ -131,6 +129,9 @@ class Connection {
bool isAuthenticated() const {return authenticated;}
void setAuthenticated() {authenticated = true;}
+ bool isIdentified() const {return identified;}
+ void setIdentified() {identified = true;}
+
const gnutls_datum_t* getCertificate() {
return gnutls_certificate_get_ours(session);
}
@@ -155,9 +156,6 @@ 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();
}