From d8a9b76a6bb2824c1e9fb0d17938c926472dd78b Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期二, 03 二月 2026 13:44:27 +0800
Subject: [PATCH] 支持帧消息协议并改进 TCP 服务器
---
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/SocketServer/SocketServerOptions.cs | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/SocketServer/SocketServerOptions.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/SocketServer/SocketServerOptions.cs
index 718497a..2844c0c 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/SocketServer/SocketServerOptions.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/SocketServer/SocketServerOptions.cs
@@ -25,7 +25,7 @@
/// <summary>
/// 连接队列长度
/// </summary>
- public int Backlog { get; set; } = 100;
+ public int Backlog { get; set; } = 1000;
/// <summary>
/// 文本编码名称(例如: utf-8, gbk)
@@ -51,5 +51,15 @@
/// 日志文件路径(相对于程序运行目录)
/// </summary>
public string LogFilePath { get; set; } = "socketserver.log";
+
+ /// <summary>
+ /// 消息头标记
+ /// </summary>
+ public string MessageHeader { get; set; } = "<START>";
+
+ /// <summary>
+ /// 消息尾标记
+ /// </summary>
+ public string MessageFooter { get; set; } = "<END>";
}
}
--
Gitblit v1.9.3