mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-02-07 16:13:23 +08:00
added header to ping packet
This commit is contained in:
parent
2efc755e70
commit
9769961eaa
@ -390,10 +390,10 @@ void Connection::Update() {
|
|||||||
|
|
||||||
if (can_communicate()
|
if (can_communicate()
|
||||||
&& real_time - last_ping_update_time_ > kPingUpdateInterval + 1000) {
|
&& real_time - last_ping_update_time_ > kPingUpdateInterval + 1000) {
|
||||||
// Send a reliable message if ping not updated in a while
|
// Send a reliable message if ping not updated in a while.
|
||||||
// purpose of this message it just to calculate ping.
|
|
||||||
|
|
||||||
std::vector<uint8_t> data(1);
|
std::vector<uint8_t> data(1);
|
||||||
|
data[0] = BA_PACKET_SIMPLE_PING;
|
||||||
SendReliableMessage(data);
|
SendReliableMessage(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user