Changeset View
Changeset View
Standalone View
Standalone View
source/network/NetClient.cpp
Show First 20 Lines • Show All 177 Lines • ▼ Show 20 Lines | void CNetClient::SetAndOwnSession(CNetClientSession* session) | ||||
delete m_Session; | delete m_Session; | ||||
m_Session = session; | m_Session = session; | ||||
} | } | ||||
void CNetClient::DestroyConnection() | void CNetClient::DestroyConnection() | ||||
{ | { | ||||
// Attempt to send network messages from the current frame before connection is destroyed. | // Attempt to send network messages from the current frame before connection is destroyed. | ||||
if (m_ClientTurnManager) | if (m_ClientTurnManager) | ||||
{ | |||||
m_ClientTurnManager->OnDestroyConnection(); | m_ClientTurnManager->OnDestroyConnection(); | ||||
Flush(); | Flush(); | ||||
} | |||||
SAFE_DELETE(m_Session); | SAFE_DELETE(m_Session); | ||||
} | } | ||||
void CNetClient::Poll() | void CNetClient::Poll() | ||||
{ | { | ||||
if (!m_Session) | if (!m_Session) | ||||
return; | return; | ||||
▲ Show 20 Lines • Show All 711 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator