summaryrefslogtreecommitdiffstats
path: root/src/Net/Connection.h
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2008-06-26 02:48:06 +0200
committerMatthias Schiffer <matthias@gamezock.de>2008-06-26 02:48:06 +0200
commit91bdac7f768e538a2e25b04347b747b1902e3159 (patch)
treeed23ad1c1ce1ab901e512ff2b69dfe67242e049b /src/Net/Connection.h
parentfb949bfd7687696c47449aaea0e6a117d382d41c (diff)
downloadmad-91bdac7f768e538a2e25b04347b747b1902e3159.tar
mad-91bdac7f768e538a2e25b04347b747b1902e3159.zip
Verhindere das Kopieren von Connection- und Listener-Objekten
Diffstat (limited to 'src/Net/Connection.h')
-rw-r--r--src/Net/Connection.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Net/Connection.h b/src/Net/Connection.h
index a5bda5a..0ef3ebf 100644
--- a/src/Net/Connection.h
+++ b/src/Net/Connection.h
@@ -63,6 +63,10 @@ class Connection {
return (transR.length == transR.transmitted);
}
+ // Prevent shallow copy
+ Connection(const Connection &o);
+ Connection& operator=(const Connection &o);
+
protected:
struct ConnectionHeader {
unsigned char m;
@@ -114,7 +118,7 @@ class Connection {
bool isConnected() const {return (state != DISCONNECTED);}
bool isConnecting() {
- return (state == HANDSHAKE || state == CONNECTION_HEADER);
+ return (state == HANDSHAKE || state == CONNECTION_HEADER);
}
const IPAddress* getPeer() {return peer;}