summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/Net/Connection.h6
-rw-r--r--src/Net/Listener.h4
2 files changed, 9 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;}
diff --git a/src/Net/Listener.h b/src/Net/Listener.h
index 0837fb0..5c59a6e 100644
--- a/src/Net/Listener.h
+++ b/src/Net/Listener.h
@@ -39,6 +39,10 @@ class Listener {
std::list<ServerConnection*> connections;
+ // Prevent shallow copy
+ Listener(const Listener &o);
+ Listener& operator=(const Listener &o);
+
public:
Listener(const IPAddress &address0) throw(ConnectionException);
virtual ~Listener();