Changeset View
Changeset View
Standalone View
Standalone View
source/network/NetClient.h
/* Copyright (C) 2021 Wildfire Games. | /* Copyright (C) 2022 Wildfire Games. | ||||
* This file is part of 0 A.D. | * This file is part of 0 A.D. | ||||
* | * | ||||
* 0 A.D. is free software: you can redistribute it and/or modify | * 0 A.D. is free software: you can redistribute it and/or modify | ||||
* it under the terms of the GNU General Public License as published by | * it under the terms of the GNU General Public License as published by | ||||
* the Free Software Foundation, either version 2 of the License, or | * the Free Software Foundation, either version 2 of the License, or | ||||
* (at your option) any later version. | * (at your option) any later version. | ||||
* | * | ||||
* 0 A.D. is distributed in the hope that it will be useful, | * 0 A.D. is distributed in the hope that it will be useful, | ||||
▲ Show 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | class CNetClient : public CFsm | ||||
friend class CNetFileReceiveTask_ClientRejoin; | friend class CNetFileReceiveTask_ClientRejoin; | ||||
public: | public: | ||||
/** | /** | ||||
* Construct a client associated with the given game object. | * Construct a client associated with the given game object. | ||||
* The game must exist for the lifetime of this object. | * The game must exist for the lifetime of this object. | ||||
*/ | */ | ||||
CNetClient(CGame* game); | CNetClient(CGame* game); | ||||
CNetClient(CGame* game, const ScriptInterface& scriptInterface); | |||||
virtual ~CNetClient(); | virtual ~CNetClient(); | ||||
/** | /** | ||||
* We assume that adding a tracing function that's only called | * We assume that adding a tracing function that's only called | ||||
* during GC is better for performance than using a | * during GC is better for performance than using a | ||||
* PersistentRooted<T> where each value needs to be added to | * PersistentRooted<T> where each value needs to be added to | ||||
* the root set. | * the root set. | ||||
▲ Show 20 Lines • Show All 216 Lines • ▼ Show 20 Lines | private: | ||||
void SetAndOwnSession(CNetClientSession* session); | void SetAndOwnSession(CNetClientSession* session); | ||||
/** | /** | ||||
* Push a message onto the GUI queue listing the current player assignments. | * Push a message onto the GUI queue listing the current player assignments. | ||||
*/ | */ | ||||
void PostPlayerAssignmentsToScript(); | void PostPlayerAssignmentsToScript(); | ||||
CGame *m_Game; | CGame *m_Game; | ||||
const ScriptInterface& m_ScriptInterface; | |||||
CStrW m_UserName; | CStrW m_UserName; | ||||
CStr m_HostJID; | CStr m_HostJID; | ||||
CStr m_ServerAddress; | CStr m_ServerAddress; | ||||
u16 m_ServerPort; | u16 m_ServerPort; | ||||
bool m_UseSTUN; | bool m_UseSTUN; | ||||
/** | /** | ||||
▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator