Changeset View
Changeset View
Standalone View
Standalone View
network/NetSession.cpp
/* 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 219 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
if (!m_Server) | if (!m_Server) | ||||
return 0; | return 0; | ||||
return m_MeanRTT; | return m_MeanRTT; | ||||
} | } | ||||
CNetServerSession::CNetServerSession(CNetServerWorker& server, ENetPeer* peer) : | CNetServerSession::CNetServerSession(CNetServerWorker& server, ENetPeer* peer) : | ||||
m_Server(server), m_FileTransferer(this), m_Peer(peer), m_HostID(0), m_GUID(), m_UserName() | m_Server(server), m_FileTransferer(this), m_Peer(peer), m_ClientId(0), m_GUID(), m_UserName() | ||||
{ | { | ||||
} | } | ||||
u32 CNetServerSession::GetIPAddress() const | u32 CNetServerSession::GetIPAddress() const | ||||
{ | { | ||||
return m_Peer->address.host; | return m_Peer->address.host; | ||||
} | } | ||||
Show All 38 Lines |
Wildfire Games · Phabricator