using XGame.Framework.Interfaces; namespace XGame.Framework.Network { internal interface IHeartbeatListener { /// /// 心跳包超时回调 /// void OnTimeout(); } public interface IHeartbeat : IRunnable { /// /// 心跳发送的间隔,默认6秒 /// int Interval { get; set; } /// /// 心跳接收超时时间,默认12秒 /// int Timeout { get; set; } /// /// 心跳接收 /// void Receive(); } }