Changeset View
Changeset View
Standalone View
Standalone View
source/network/NetServer.cpp
Show First 20 Lines • Show All 1,634 Lines • ▼ Show 20 Lines | bool CNetServer::UseLobbyAuth() const | ||||
return m_LobbyAuth; | return m_LobbyAuth; | ||||
} | } | ||||
bool CNetServer::SetupConnection(const u16 port) | bool CNetServer::SetupConnection(const u16 port) | ||||
{ | { | ||||
return m_Worker->SetupConnection(port); | return m_Worker->SetupConnection(port); | ||||
} | } | ||||
CStr CNetServer::GetPublicIp() const | |||||
{ | |||||
return m_PublicIp; | |||||
} | |||||
u16 CNetServer::GetPublicPort() const | u16 CNetServer::GetPublicPort() const | ||||
{ | { | ||||
return m_PublicPort; | return m_PublicPort; | ||||
} | } | ||||
CStr CNetServer::GetPublicIp() const | u16 CNetServer::GetLocalPort() const | ||||
{ | { | ||||
return m_PublicIp; | std::lock_guard<std::mutex> lock(m_Worker->m_WorkerMutex); | ||||
if (!m_Worker->m_Host) | |||||
return 0; | |||||
return m_Worker->m_Host->address.port; | |||||
} | } | ||||
void CNetServer::SetConnectionData(const CStr& ip, const u16 port, bool useSTUN) | void CNetServer::SetConnectionData(const CStr& ip, const u16 port, bool useSTUN) | ||||
{ | { | ||||
m_PublicIp = ip; | m_PublicIp = ip; | ||||
m_PublicPort = port; | m_PublicPort = port; | ||||
m_UseSTUN = useSTUN; | m_UseSTUN = useSTUN; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 68 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator