diff --git a/src/network/core/tcp.h b/src/network/core/tcp.h --- a/src/network/core/tcp.h +++ b/src/network/core/tcp.h @@ -103,9 +103,14 @@ private: void Connect(addrinfo *address); bool CheckActivity(); + /* We do not want any other derived classes from this class being able to + * access these private members, but it is okay for TCPServerConnecter. */ + friend class TCPServerConnecter; + static void ResolveThunk(TCPConnecter *connecter); public: + TCPConnecter() {}; TCPConnecter(const std::string &connection_string, uint16 default_port); virtual ~TCPConnecter(); @@ -124,4 +129,11 @@ public: static void KillAll(); }; +class TCPServerConnecter : public TCPConnecter { +public: + ServerAddress server_address; ///< Address we are connecting to. + + TCPServerConnecter(const std::string &connection_string, uint16 default_port); +}; + #endif /* NETWORK_CORE_TCP_H */