summaryrefslogtreecommitdiff
path: root/src/network/network_client.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/network_client.h')
-rw-r--r--src/network/network_client.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/network/network_client.h b/src/network/network_client.h
index 66cdb8ba5..40b8eedf9 100644
--- a/src/network/network_client.h
+++ b/src/network/network_client.h
@@ -15,12 +15,14 @@
/** Class for handling the client side of the game connection. */
class ClientNetworkGameSocketHandler : public ZeroedMemoryAllocator, public NetworkGameSocketHandler {
private:
+ NetworkAddress address; ///< Address we are connected to.
struct PacketReader *savegame; ///< Packet reader for reading the savegame.
byte token; ///< The token we need to send back to the server to prove we're the right client.
/** Status of the connection with the server. */
enum ServerStatus {
STATUS_INACTIVE, ///< The client is not connected nor active.
+ STATUS_GAME_INFO, ///< We are trying to get the game information.
STATUS_COMPANY_INFO, ///< We are trying to get company information.
STATUS_JOIN, ///< We are trying to join a server.
STATUS_NEWGRFS_CHECK, ///< Last action was checking NewGRFs.
@@ -74,13 +76,13 @@ protected:
static NetworkRecvStatus SendMapOk();
void CheckConnection();
public:
- ClientNetworkGameSocketHandler(SOCKET s);
+ ClientNetworkGameSocketHandler(SOCKET s, NetworkAddress address);
~ClientNetworkGameSocketHandler();
NetworkRecvStatus CloseConnection(NetworkRecvStatus status) override;
void ClientError(NetworkRecvStatus res);
- static NetworkRecvStatus SendInformationQuery();
+ static NetworkRecvStatus SendInformationQuery(bool request_company_info);
static NetworkRecvStatus SendJoin();
static NetworkRecvStatus SendCommand(const CommandPacket *cp);