コード例 #1
0
 /// <summary>
 /// Sends a keep-alive message to the game server. This is non-blocking.
 /// </summary>
 public void SendKeepAlive()
 {
     if (!IsConnecting && IsConnected)
     {
         try
         {
             SendCore(PacketFactory.MakeKeepAliveBuffer());
         }
         catch (Exception e)
         {
             Debug.LogWarning("SendKeepAlive exception, trying again: " + e.ToString());
             SendKeepAlive();
         }
     }
 }
コード例 #2
0
 /// <summary>
 /// Sends a keep-alive message to the game server. This is non-blocking.
 /// </summary>
 public void SendKeepAlive()
 {
     Debug.Log($"Sending keep alive...");
     SendCore(PacketFactory.MakeKeepAliveBuffer());
 }