| | |
| | | using System.Text; |
| | | using System.Threading; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_QuartzJob; |
| | | |
| | | namespace WIDESEAWCS_Tasks.SocketServer |
| | |
| | | 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> |
| | | /// 机器人连接断开事件 |