SuperSocket.WebSocket
2.0.2
dotnet add package SuperSocket.WebSocket --version 2.0.2
NuGet\Install-Package SuperSocket.WebSocket -Version 2.0.2
<PackageReference Include="SuperSocket.WebSocket" Version="2.0.2" />
<PackageVersion Include="SuperSocket.WebSocket" Version="2.0.2" />
<PackageReference Include="SuperSocket.WebSocket" />
paket add SuperSocket.WebSocket --version 2.0.2
#r "nuget: SuperSocket.WebSocket, 2.0.2"
#addin nuget:?package=SuperSocket.WebSocket&version=2.0.2
#tool nuget:?package=SuperSocket.WebSocket&version=2.0.2
Release Note: SuperSocket 2.0.2
Overview
SuperSocket 2.0.2 is a major update that builds upon the foundation of v2.0.1, introducing significant performance improvements, enhanced API flexibility, and comprehensive bug fixes. This release focuses on optimizing data processing, improving dependency injection capabilities, and enhancing overall stability.
Key Improvements
Performance Enhancements
Optimized Extensions for Data Processing
- Added LittleEndian methods for efficient byte order conversions
- Optimized BigEndian performance with improved algorithms in
Extensions.cs
- Enhanced
SequenceReader
extensions with comprehensive test coverage - Improved memory efficiency and reduced allocations in data processing pipelines
Method Naming Optimizations
- Optimized method naming conventions across connection classes for better clarity
- Improved readability and consistency in the API surface
- Enhanced developer experience with more intuitive method names
Enhanced Dependency Injection Support
Pipeline Filter Constructor Flexibility
- Removed the
new()
constraint from pipeline filter type parameters - Enabled full dependency injection support for pipeline filters
- Pipeline filters can now receive services through constructor injection
- Backward compatible with existing pipeline filters that use default constructors
Affected Components
The dependency injection improvements span across:
ISuperSocketHostBuilder<TReceivePackage>
interfaceHostBuilderExtensions
methodsMultipleServerHostBuilder
configurationsSuperSocketHostBuilder
static and instance methods
Connection and Session Management Improvements
IDisposable Implementation
- Added
IDisposable
interfaces toIConnection
andIEasyClient
- Improved resource management and cleanup processes
- Enhanced connection lifecycle management
Stability and Bug Fixes
Configuration and Host Builder Fixes
- Fixed application builder compatibility issues
- Resolved problems where non-web application builders couldn't be used as SuperSocket application builders
- Improved host builder extensibility and configuration options
Connection Reliability
- Added
ConfigureAwait(false)
toSendAsync
operations for better performance - Improved connection handling and error recovery
- Enhanced connection state management and cleanup
Testing and Quality Improvements
Comprehensive Test Coverage
- Added
PipelineFilterRegistrationTest
for dependency injection scenarios - Enhanced
SequenceReaderExtensionTest
with new test cases - Improved test infrastructure with better base classes
- Added comprehensive WebSocket testing improvements
Code Quality Enhancements
- Added
.editorconfig
for consistent code formatting - Improved XML documentation coverage across the codebase
- Enhanced code comments and documentation
- Better code organization and structure
API and Framework Enhancements
Package Management
- Updated project descriptions across all packages
- Enhanced NuGet package metadata
- Improved release note integration in packages
- Better package discovery and documentation
Framework Integration
- Improved .NET host integration capabilities
- Enhanced middleware pipeline flexibility
- Better service container integration
- Improved configuration system compatibility
Breaking Changes
None - This release maintains full backward compatibility with existing SuperSocket 2.x applications.
Migration Guide
For Pipeline Filter Dependencies
If you want to leverage the new dependency injection capabilities for pipeline filters:
// Before: Only default constructors were supported
public class MyPipelineFilter : IPipelineFilter<TextPackageInfo>
{
public MyPipelineFilter() { } // Required default constructor
}
// After: Constructor injection is now supported
public class MyPipelineFilter : IPipelineFilter<TextPackageInfo>
{
private readonly ILogger<MyPipelineFilter> _logger;
private readonly IConfiguration _configuration;
public MyPipelineFilter(ILogger<MyPipelineFilter> logger, IConfiguration configuration)
{
_logger = logger;
_configuration = configuration;
}
}
// Register dependencies and use the filter
hostBuilder
.ConfigureServices((ctx, services) =>
{
services.AddSingleton<IMyService, MyService>();
})
.AsSuperSocketHostBuilder<TextPackageInfo, MyPipelineFilter>();
Performance Benchmarks
- Data processing improvements: Up to 15% performance improvement in byte order conversions
- Memory allocation reduction: Reduced allocations in high-throughput scenarios
- Connection handling: Improved connection establishment and cleanup performance
Compatibility
- .NET 6.0+: Full support for modern .NET versions
- Platform: Cross-platform support (Windows, Linux, macOS)
- Backward compatibility: 100% compatible with existing SuperSocket 2.x applications
- Dependencies: Compatible with Microsoft.Extensions.* ecosystem
Contributors
- Kerry Jiang (@kerryjiang)
- Copilot (@Copilot)
- hyabean (@hyabean)
Links
- GitHub Repository: https://github.com/kerryjiang/SuperSocket
- Documentation: https://docs.supersocket.net/
- NuGet Packages: https://www.nuget.org/packages?q=SuperSocket
- Release Downloads: https://github.com/kerryjiang/SuperSocket/releases/tag/v2.0.2
Next Steps
- Continue performance optimizations
- Expand documentation and examples
- Enhanced testing coverage
- Community feedback integration
Installation:
dotnet add package SuperSocket --version 2.0.2
Upgrade from previous versions:
dotnet add package SuperSocket --version 2.0.2
# No breaking changes - direct upgrade supported
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net6.0
- SuperSocket.ProtoBase (>= 2.0.2)
-
net7.0
- SuperSocket.ProtoBase (>= 2.0.2)
-
net8.0
- SuperSocket.ProtoBase (>= 2.0.2)
-
net9.0
- SuperSocket.ProtoBase (>= 2.0.2)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on SuperSocket.WebSocket:
Package | Downloads |
---|---|
WebSocket4Net
A popular .NET websocket client. |
|
SuperSocket.WebSocket.Server
SuperSocket WebSocket server implementation enabling real-time bidirectional communication with WebSocket protocol support. |
|
MTD.BM.Common
此模块为MTD系统基础模块,包含多个组件 |
GitHub repositories (5)
Showing the top 5 popular GitHub repositories that depend on SuperSocket.WebSocket:
Repository | Stars |
---|---|
kerryjiang/WebSocket4Net
A popular .NET WebSocket Client
|
|
Lunat1q/Catchem-PoGo
Project is DEAD, Discord server: https://discord.me/Catchem
|
|
brianzhouzc/RocketBot
An automated Pokémon Go Bot
|
|
MobBotTeam/PokeMobBot
a Pokemon Go Bot by PokeMobBot Team - Discord: https://discord.gg/8msqsWV | Forums:
|
|
Necrobot-Private/NecroBot
NecroBot2
|
Version | Downloads | Last Updated |
---|---|---|
2.0.2 | 0 | 7/10/2025 |
2.0.1 | 1,169 | 5/24/2025 |
2.0.0 | 701 | 4/20/2025 |
2.0.0-beta.31 | 412 | 4/2/2025 |
2.0.0-beta.30 | 350 | 1/26/2025 |
2.0.0-beta.28 | 647 | 11/2/2024 |
2.0.0-beta.27 | 235 | 9/30/2024 |
2.0.0-beta.26 | 1,756 | 8/31/2024 |
2.0.0-beta.25 | 234 | 8/21/2024 |
2.0.0-beta.24 | 1,163 | 6/29/2024 |
2.0.0-beta.23 | 1,195 | 6/1/2024 |
2.0.0-beta.22 | 1,226 | 5/25/2024 |
2.0.0-beta.21 | 418 | 5/4/2024 |
2.0.0-beta.20.448 | 777 | 4/14/2024 |
2.0.0-beta.18 | 3,360 | 8/30/2023 |
2.0.0-beta.17 | 1,796 | 6/4/2023 |
2.0.0-beta.16 | 360 | 5/10/2023 |
2.0.0-beta.15 | 949 | 3/5/2023 |
2.0.0-beta.14 | 1,592 | 2/21/2023 |
2.0.0-beta.13 | 671 | 1/17/2023 |
2.0.0-beta.12 | 17,962 | 10/30/2022 |
2.0.0-beta.11 | 3,704 | 5/6/2022 |
2.0.0-beta.10 | 21,786 | 5/29/2021 |
2.0.0-beta.9 | 306 | 5/26/2021 |
2.0.0-beta.8 | 9,478 | 1/23/2021 |
1.6.6.1 | 194,579 | 5/19/2016 |
1.6.6.1-beta1 | 2,053 | 4/6/2016 |
1.6.6 | 4,090 | 3/21/2016 |
1.6.5 | 64,936 | 11/10/2015 |