You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
724 B
37 lines
724 B
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);
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|