File diff r25826:89dc24729f74 → r25827:5a9ded1a0c1a
src/network/core/tcp.h
Show inline comments
 
@@ -96,12 +96,13 @@ private:
 

	
 
	std::vector<SOCKET> sockets;                        ///< Pending connect() attempts.
 
	std::chrono::steady_clock::time_point last_attempt; ///< Time we last tried to connect.
 

	
 
	std::string connection_string;                      ///< Current address we are connecting to (before resolving).
 
	NetworkAddress bind_address;                        ///< Address we're binding to, if any.
 
	int family = AF_UNSPEC;                             ///< Family we are using to connect with.
 

	
 
	void Resolve();
 
	void OnResolved(addrinfo *ai);
 
	bool TryNextAddress();
 
	void Connect(addrinfo *address);
 
	virtual bool CheckActivity();
 
@@ -111,13 +112,13 @@ private:
 
	friend class TCPServerConnecter;
 

	
 
	static void ResolveThunk(TCPConnecter *connecter);
 

	
 
public:
 
	TCPConnecter() {};
 
	TCPConnecter(const std::string &connection_string, uint16 default_port, NetworkAddress bind_address = {});
 
	TCPConnecter(const std::string &connection_string, uint16 default_port, NetworkAddress bind_address = {}, int family = AF_UNSPEC);
 
	virtual ~TCPConnecter();
 

	
 
	/**
 
	 * Callback when the connection succeeded.
 
	 * @param s the socket that we opened
 
	 */