wanshenmean
2026-02-28 c3de7bb2097aa347a1f92c2f640d18753aff633a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
using WIDESEAWCS_Core.Core;
 
namespace WIDESEAWCS_Tasks.SocketServer
{
    /// <summary>
    /// Socket·þÎñ¶ËÅäÖÃ
    /// </summary>
    public class SocketServerOptions : IConfigurableOptions
    {
        /// <summary>
        /// ÊÇ·ñÆôÓÃ
        /// </summary>
        public bool Enabled { get; set; } = true;
 
        /// <summary>
        /// ¼àÌý¶Ë¿Ú
        /// </summary>
        public int Port { get; set; } = 2000;
 
        /// <summary>
        /// ¼àÌýµØÖ·
        /// </summary>
        public string IpAddress { get; set; } = "0.0.0.0";
 
        /// <summary>
        /// Á¬½Ó¶ÓÁ㤶È
        /// </summary>
        public int Backlog { get; set; } = 1000;
 
        /// <summary>
        /// Îı¾±àÂëÃû³Æ£¨ÀýÈç: utf-8, gbk£©
        /// </summary>
        public string EncodingName { get; set; } = "utf-8";
 
        /// <summary>
        /// ÊÇ·ñ×Ô¶¯¼ì²â±àÂ루³¢ÊÔ UTF-8 ºó»ØÍ˵½ GBK£©
        /// </summary>
        public bool AutoDetectEncoding { get; set; } = true;
 
        /// <summary>
        /// ¿Í»§¶Ë¿ÕÏг¬Ê±Ê±¼ä£¨Ã룩£¬³¬¹ýÔò¶Ï¿ª
        /// </summary>
        public int IdleTimeoutSeconds { get; set; } = 300;
 
        /// <summary>
        /// ÊÇ·ñÆôÓÃÐÄÌø¼ì²é
        /// </summary>
        public bool EnableHeartbeat { get; set; } = true;
 
        /// <summary>
        /// ÈÕÖ¾Îļþ·¾¶£¨Ïà¶ÔÓÚ³ÌÐòÔËÐÐĿ¼£©
        /// </summary>
        public string LogFilePath { get; set; } = "socketserver.log";
 
        /// <summary>
        /// ÏûϢͷ±ê¼Ç
        /// </summary>
        public string MessageHeader { get; set; } = "<START>";
 
        /// <summary>
        /// ÏûϢβ±ê¼Ç
        /// </summary>
        public string MessageFooter { get; set; } = "<END>";
    }
}