summaryrefslogtreecommitdiff
path: root/src/connection.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/connection.h')
-rw-r--r--src/connection.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/connection.h b/src/connection.h
index 516702cb8..be1627dfa 100644
--- a/src/connection.h
+++ b/src/connection.h
@@ -918,13 +918,17 @@ class ConnectionSendThread : public JThread {
public:
friend class UDPPeer;
- ConnectionSendThread(Connection* parent,
- unsigned int max_packet_size, float timeout);
+ ConnectionSendThread(unsigned int max_packet_size, float timeout);
void * Thread ();
void Trigger();
+ void setParent(Connection* parent) {
+ assert(parent != NULL);
+ m_connection = parent;
+ }
+
void setPeerTimeout(float peer_timeout)
{ m_timeout = peer_timeout; }
@@ -970,11 +974,15 @@ private:
class ConnectionReceiveThread : public JThread {
public:
- ConnectionReceiveThread(Connection* parent,
- unsigned int max_packet_size);
+ ConnectionReceiveThread(unsigned int max_packet_size);
void * Thread ();
+ void setParent(Connection* parent) {
+ assert(parent != NULL);
+ m_connection = parent;
+ }
+
private:
void receive ();