kerryjiang / SuperSocket

SuperSocket is a light weight, cross platform and extensible socket server application framework.
Apache License 2.0
3.95k stars 1.15k forks source link

Add GZip Support #524

Closed dameng324 closed 3 years ago

dameng324 commented 3 years ago

增加了 SuperSocket.GZip项目,通过容器注册IChannelCreatorFactory的方式来实现。 Client端采用GZipConnector方式。

dameng324 commented 3 years ago

单元测试也改了一些东西,目前所有的单元测试均已通过。

dameng324 commented 3 years ago

没有修改TcpChannel和StreamChannel的逻辑,这个你自己决定怎么处理吧,要不要合并。

kerryjiang commented 3 years ago

Looks good! But the projects' type guid were changed. I will check it later.

kerryjiang commented 3 years ago

Found two issues 1) No compatible output with netstandard2.1 for SuperSocket.GZip.dll: netstandard2.1/SuperSocket.GZip.dll; 2) There is a warning: /Users/runner/work/SuperSocket/SuperSocket/src/SuperSocket.GZip/GZipConnector.cs(24,58): warning CS1998: This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread. [/Users/runner/work/SuperSocket/SuperSocket/src/SuperSocket.GZip/SuperSocket.GZip.csproj]

kerryjiang commented 3 years ago

And test failed: https://github.com/kerryjiang/SuperSocket/runs/3415269454?check_suite_focus=true#step:8:759

dameng324 commented 3 years ago

I create a new PR to solve these problems. https://github.com/kerryjiang/SuperSocket/pull/525