/// <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(); } } }
/// <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()); }