Skip to content

Conversation

@RRQM
Copy link
Contributor

@RRQM RRQM commented Dec 21, 2025

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

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
Copilot AI review requested due to automatic review settings December 21, 2025 07:27
Copy link

Copilot AI left a 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.

RRQM added 3 commits December 22, 2025 12:49
新增 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;
Copy link
Member

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 =>
Copy link
Member

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",
Copy link
Member

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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants