# Get Ping? (C++ library)

**URL:** <https://forum.heroiclabs.com/t/get-ping-c-library/2431>\
**Category:** Client Libraries\
**Created:** [March 5, 2022, 8:55pm UTC](https://forum.heroiclabs.com/t/get-ping-c-library/2431 "2022-03-05T20:55:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mehoo462](https://avatars.discourse-cdn.com/v4/letter/m/b487fb/32.png) [@Mehoo462](https://forum.heroiclabs.com/u/Mehoo462)\
**Post date:** [March 5, 2022, 8:55pm UTC](https://forum.heroiclabs.com/t/get-ping-c-library/2431/1 "2022-03-05T20:55:05Z")

</div>

Greetings!

Is there a function in the C++ library I can use to get the ping to the server? I’d like to show players their ping and the pings of their colleagues.

I also might want to build some contingencies into my game for high latency situations.

Is there a way to get the ping from within Nakama? Thanks!

---

<div class="post-metadata">

**Author:** ![sesposito](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/sesposito/32/2594_2.png) [@sesposito](https://forum.heroiclabs.com/u/sesposito)\
**Post date:** [March 7, 2022, 9:10am UTC](https://forum.heroiclabs.com/t/get-ping-c-library/2431/2 "2022-03-07T09:10:23Z")

</div>

Hello @Mehoo462.

There is no built in ping implementation/function, but you can easily create a custom RPC with an empty payload and calculate how long it took to get the response back on the client. There’ll be some additional overhead but it should be neglegible and allow you to get an estimate of the network round-trip time.

Hope this helps.

---

<div class="post-metadata">

**Author:** ![Mehoo462](https://avatars.discourse-cdn.com/v4/letter/m/b487fb/32.png) [@Mehoo462](https://forum.heroiclabs.com/u/Mehoo462)\
**Post date:** [March 18, 2022, 6:05pm UTC](https://forum.heroiclabs.com/t/get-ping-c-library/2431/3 "2022-03-18T18:05:39Z")

</div>

This is helpful. Thanks!
