Commit 8ab8b10
committed
新增(Program.cs): 配置管道选项优化服务器性能
引入 `System.Buffers` 和 `System.IO.Pipelines` 命名空间以支持内存池和管道功能。将 `server` 变量的声明从 `var` 改为显式类型 `MyServer`。在 `SetupAsync` 方法中,添加 `TransportOption` 配置,设置 `BufferOnDemand` 为 `false`,并配置 `ReceivePipeOptions` 和 `SendPipeOptions`,以优化服务器性能。删除多余空行。1 parent ba062a5 commit 8ab8b10
File tree
1 file changed
+26
-2
lines changed- frameworks/CSharp/touchsocket/src/TouchSocketHttpPlatform
1 file changed
+26
-2
lines changedLines changed: 26 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
22 | | - | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
26 | 50 | | |
27 | 51 | | |
28 | 52 | | |
29 | 53 | | |
30 | 54 | | |
31 | 55 | | |
32 | 56 | | |
33 | | - | |
| 57 | + | |
34 | 58 | | |
35 | 59 | | |
36 | 60 | | |
| |||
0 commit comments