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.

50 lines
875 B

using HybirdFrameworkCore.Autofac.Attribute;
using HybirdFrameworkCore.AutoTask;
using Service.TBox.Server;
namespace Service.TBox.MyTask;
[Scope]
public class VinTask : ITask
{
public static readonly string TaskName = "VinTask";
private volatile bool _stop = true;
public string Name()
{
return TaskName;
}
public int Interval()
{
return 100;
}
public void Handle()
{
3 months ago
if(TBoxServerMgr.Server!=null)
foreach (var vinMsg in TBoxServerMgr.Server?.SendVinMsg)
{
if (vinMsg != null)
{
TBoxServerMgr.Server?.SessionMgr.Broadcast(vinMsg);
}
}
}
public bool Stoped()
{
return _stop;
}
public void Stop()
{
_stop = true;
}
public void ResetStop()
{
_stop = false;
}
}