Home > other >  Mobile phone game client do show how much the function of the network delay
Mobile phone game client do show how much the function of the network delay

Time:09-22

In the mobile phone games, according to the client of the current network latency: 33, this function should do, on ios and cocos want to separate, thank you teach

CodePudding user response:

Delay this stuff is do yourself, should be platform independent, may have similar third-party tools

When you send a request to record the sending time, then I received the response records the receive time, this time is the time delay,
Then open several threads run, calculate the average over a period of time is the current network latency,

I literally written, it is good to look at

CodePudding user response:

Delay this stuff is do yourself, should be platform independent, may have similar third-party tools

When you send a request to record the sending time, then I received the response records the receive time, this time is the time delay,
Then open several threads run, calculate the average over a period of time is the current network latency,

I literally written, it is good to look at

CodePudding user response:

Direct use ping service is ok, if not need very accurate,
  • Related