wanshenmean
6 小时以前 f423e1277f91427f0a767bd1224c1260dcb73086
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/SocketServer/TcpSocketServer.cs
@@ -6,6 +6,7 @@
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using WIDESEAWCS_Model.Models;
using WIDESEAWCS_QuartzJob;
namespace WIDESEAWCS_Tasks.SocketServer
@@ -136,13 +137,18 @@
        public bool IsRunning { get; private set; }
        /// <summary>
        /// 上次接收消息源
        /// </summary>
        public string lastMessage;
        /// <summary>
        /// 消息接收事件
        /// </summary>
        /// <remarks>
        /// 当服务器接收到消息时触发。
        /// 参数:消息内容、是否 JSON 格式、TCP 客户端、机器人状态
        /// </remarks>
        public event Func<string, bool, TcpClient, RobotSocketState, Task<string?>>? MessageReceived;
        public event Func<string, bool, TcpClient, Task<string?>>? MessageReceived;
        /// <summary>
        /// 机器人连接断开事件