You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kev/Drawer/IPCLib/HeartbeatPacket.cs

38 lines
952 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IPCLib
{
public class HeartbeatPacket
{
/// <summary>
/// 发送方标识
/// </summary>
public string Source { get; set; } = "Unknown";
/// <summary>
/// 时间戳
/// </summary>
public long Timestamp { get; set; } = DateTime.Now.Ticks;
/// <summary>
/// 心跳序号 (用于检测丢包)
/// </summary>
public long SequenceId { get; set; }
/// <summary>
/// 业务数据 (JSON 字符串或特定格式)
/// 如果为空,表示纯心跳
/// </summary>
public string Payload { get; set; } = "";
/// <summary>
/// 连接状态 (可选,用于告知对方自己是否正常)
/// </summary>
public string Status { get; set; } = "OK";
}
}