forked from mirror/OpenTTD
Codechange: track servers with a ServerAddress instead of a NetworkAddress
This allows future extensions to have different ways of referencing a server, instead of forcing to use IP:port.
This commit is contained in:
committed by
Patric Stout
parent
f4dd2d88c7
commit
cee8174d02
@@ -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 */
|
||||
|
Reference in New Issue
Block a user