15.Gaining server time from client

To synchronize the time between hosts, ProudNet helps you gaining the server time.

There are two ways to do this.

15.1Gaining the server time by checking the latency of server

You can gain the actual server time in consideration of latency between you and server through Proud.CNetClient.GetServerTime.

15.2Gaining the server time by latency of server and clients in P2P connection

In this method, you can gain the average server time of latency of server and latency of client in P2P communication.

Sometimes this method is more accurate than just gaining the server time by checking latency of server.

You can use Proud.CNetClient.GetP2PServerTime for this method.