Ping Pong Manager in Unity Clients

Hello,

I wonder something about PingPongManager. Is this ping mechanism smart or just a regular send ping and waiting pong response?

For example, client call any rpc method or update game state, PingPongManager reset itself ping time interval? Is pingPongManager count this responses as like pong? Or just send ping every KeepAliveInterval seconds and wait pong.

@volvox The PingPongManager in the Unity/.NET client SDK executes on a fixed interval. The server-side does its own heartbeats which are optimized to eliminate redundant socket checks when other messages are observed within the interval window.

client call any rpc method or update game state

An RPC call with client.Rpc(...) does not execute over the socket in the SDK.

So PingPongManager execute own request(ping) and response(pong). But this manager knows just _socket.SendMatchStateAsync, it is not observe client.Rpc methods right? Which means related with socket not client methods.

Yes absolutely. The PingPongManager is only used to improve the socket disconnect detection on the client side when the ISocket object is used. All functions on the IClient execute request/response and don’t send over the socket connection.