Changeset View
Changeset View
Standalone View
Standalone View
network/NetSession.h
/* Copyright (C) 2020 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 151 Lines • ▼ Show 20 Lines | public: | ||||
CNetServerWorker& GetServer() { return m_Server; } | CNetServerWorker& GetServer() { return m_Server; } | ||||
const CStr& GetGUID() const { return m_GUID; } | const CStr& GetGUID() const { return m_GUID; } | ||||
void SetGUID(const CStr& guid) { m_GUID = guid; } | void SetGUID(const CStr& guid) { m_GUID = guid; } | ||||
const CStrW& GetUserName() const { return m_UserName; } | const CStrW& GetUserName() const { return m_UserName; } | ||||
void SetUserName(const CStrW& name) { m_UserName = name; } | void SetUserName(const CStrW& name) { m_UserName = name; } | ||||
u32 GetHostID() const { return m_HostID; } | u32 GetClientId() const { return m_ClientId; } | ||||
void SetHostID(u32 id) { m_HostID = id; } | void SetClientId(u32 id) { m_ClientId = id; } | ||||
u32 GetIPAddress() const; | u32 GetIPAddress() const; | ||||
/** | /** | ||||
* Number of milliseconds since the latest packet of that client was received. | * Number of milliseconds since the latest packet of that client was received. | ||||
*/ | */ | ||||
u32 GetLastReceivedTime() const; | u32 GetLastReceivedTime() const; | ||||
Show All 28 Lines | private: | ||||
CNetServerWorker& m_Server; | CNetServerWorker& m_Server; | ||||
CNetFileTransferer m_FileTransferer; | CNetFileTransferer m_FileTransferer; | ||||
ENetPeer* m_Peer; | ENetPeer* m_Peer; | ||||
CStr m_GUID; | CStr m_GUID; | ||||
CStrW m_UserName; | CStrW m_UserName; | ||||
u32 m_HostID; | u32 m_ClientId; | ||||
CStr m_Password; | CStr m_Password; | ||||
}; | }; | ||||
#endif // NETSESSION_H | #endif // NETSESSION_H |
Wildfire Games · Phabricator