using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Sog; using Google.Protobuf.WellKnownTypes; using Google.Protobuf; namespace SMWebServer { public static class SMWebServerSvc { public static long lastPingTimeMs; public static void Update(long tMs) { if(tMs - lastPingTimeMs < 30000) { return; } lastPingTimeMs = tMs; if(SMWebServerNet.Instance.IsConnected() == false) { return; } SMPing ping = new SMPing(); SMWebServerNet.Instance.SendMsgToCenter(ping, SMMsgID.Ping); } } }