mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Improve Connection with threading and some kind of congestion control
This commit is contained in:
parent
b6fcbc5fba
commit
4b6138e69b
12 changed files with 1163 additions and 716 deletions
10
src/client.h
10
src/client.h
|
@ -251,11 +251,11 @@ public:
|
|||
|
||||
float getAvgRtt()
|
||||
{
|
||||
//JMutexAutoLock lock(m_con_mutex); //bulk comment-out
|
||||
con::Peer *peer = m_con.GetPeerNoEx(PEER_ID_SERVER);
|
||||
if(peer == NULL)
|
||||
return 0.0;
|
||||
return peer->avg_rtt;
|
||||
try{
|
||||
return m_con.GetPeerAvgRTT(PEER_ID_SERVER);
|
||||
} catch(con::PeerNotFoundException){
|
||||
return 1337;
|
||||
}
|
||||
}
|
||||
|
||||
bool getChatMessage(std::wstring &message)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue