-
Notifications
You must be signed in to change notification settings - Fork 2k
Optimize (csproj): Upgrade TouchSocket-related packages to version 4.0.4 #10433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Upgrade the NuGet package versions of TouchSocket.Http, TouchSocket, TouchSocket.Hosting, and TouchSocket.WebApi from 4.0.2 to 4.0.4 to enhance the stability and feature completeness of the dependency libraries
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR upgrades TouchSocket-related NuGet packages from version 4.0.2 to 4.0.4 across three project files to improve stability and feature completeness of the dependency libraries.
- Upgrades TouchSocket.Http, TouchSocket, TouchSocket.Hosting, and TouchSocket.WebApi packages
- All 4.0.2 versions consistently upgraded to 4.0.4
- Separate 3.1.0 variants (TouchSocketHttp31 and TouchSocketWebApi31) intentionally left unchanged
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| TouchSocketWebApi.csproj | Upgrades TouchSocket.Hosting and TouchSocket.WebApi from 4.0.2 to 4.0.4 |
| TouchSocketHttpPlatform.csproj | Upgrades TouchSocket core package from 4.0.2 to 4.0.4 |
| TouchSocketHttp.csproj | Upgrades TouchSocket.Http from 4.0.2 to 4.0.4 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
新增 TouchSocketHttpSyncPlatform 项目,支持高性能同步 HTTP 服务器,完善 benchmark_config.json、config.toml 配置,新增 Dockerfile 及 NuGet.Config,便于基准测试与容器化部署
将按任意键停止服务器改为循环读取用户输入,每次输入后停止服务器,移除相关提示,提升操作灵活性
删除 while 循环中设置 _isRunning 为 false 和关闭 _listenerSocket 的代码,现在仅保留 Console.ReadLine(),服务器关闭流程不再在此处控制。
| private static ReadOnlySpan<byte> Json => "/json"u8; | ||
| private static ReadOnlySpan<byte> Plaintext => "/plaintext"u8; | ||
| private static ReadOnlySpan<byte> PlainTextBody => "Hello, World!"u8; | ||
| private static ReadOnlySpan<byte> JsonBody => "{\"message\":\"Hello, World!\"}"u8; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is in violation of our rules: https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#json-serialization
xiv. The serialization to JSON must not be cached; the computational effort to serialize an object to JSON must occur within the scope of handling each request.
| "Content-Type: text/plain\r\n"u8 + | ||
| "Content-Length: 13\r\n"u8; | ||
|
|
||
| private static ReadOnlySpan<byte> JsonPreamble => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly, these headers need to be calculated as a part of the exercise.
| "plaintext_url": "/plaintext", | ||
| "json_url": "/json", | ||
| "port": 8080, | ||
| "approach": "Realistic", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The approach outlined here is "Stripped", not "Realistic".
Upgrade the NuGet package versions of TouchSocket.Http, TouchSocket, TouchSocket.Hosting, and TouchSocket.WebApi from 4.0.2 to 4.0.4 to enhance the stability and feature completeness of the dependency libraries