SuperSocket.Command 2.0.2-beta.1
Release Note: SuperSocket 2.0.2-beta.1
Overview
SuperSocket 2.0.2-beta.1 is a beta release that enhances the flexibility of pipeline filters by removing the constraint requiring a default constructor. This change significantly improves dependency injection support for pipeline filters across the framework.
Key Improvements
Enhanced Dependency Injection Support for Pipeline Filters
- Removed the constraint requiring pipeline filters to have a parameterless constructor (
new()
constraint) - This change enables pipeline filters to receive dependencies through constructor injection
- Modified all relevant method signatures across the framework to support this new flexibility
Affected Components
The new()
constraint was removed from the following interfaces and methods:
In
ISuperSocketHostBuilder<TReceivePackage>
interface:UsePipelineFilter<TPipelineFilter>()
method
In
HostBuilderExtensions
class:AsSuperSocketHostBuilder<TReceivePackage, TPipelineFilter>()
method
In
MultipleServerHostBuilder
class:AddServer<TReceivePackage, TPipelineFilter>()
methodAddServer<TSuperSocketService, TReceivePackage, TPipelineFilter>()
method
In
SuperSocketHostBuilder
class and static methods:UsePipelineFilter<TPipelineFilter>()
methodCreate<TReceivePackage, TPipelineFilter>()
methods
Compatibility
This change is backward compatible with existing code. Pipeline filters with default constructors will continue to work as before, but now you can also create pipeline filters that require dependencies to be injected.
Example Usage
With this change, you can now create pipeline filters that require dependencies:
public class MyPipelineFilter : IPipelineFilter<TextPackageInfo>
{
private readonly ILogger<MyPipelineFilter> _logger;
private readonly IConfiguration _configuration;
// Constructor with dependencies - now supported!
public MyPipelineFilter(ILogger<MyPipelineFilter> logger, IConfiguration configuration)
{
_logger = logger;
_configuration = configuration;
}
// Implementation details...
}
// Register and use the filter
hostBuilder.AsSuperSocketHostBuilder<TextPackageInfo, MyPipelineFilter>();
Release Status
This is a beta release intended for testing. Please report any issues you encounter on the GitHub repository.
Contributors
- Kerry Jiang
Links
- GitHub Repository: https://github.com/kerryjiang/SuperSocket
- Documentation: https://docs.supersocket.net/
- NuGet Packages: https://www.nuget.org/packages?q=SuperSocket
Showing the top 20 packages that depend on SuperSocket.Command.
Packages | Downloads |
---|---|
SuperSocket
SuperSocket is a light weight, cross platform and extensible socket server application framework. You can use it to build a server side socket application (like game server, GPS server, industrial control system, data acquisition server etc) easily without thinking about how to use socket, how to maintain the socket connections and how socket works.
|
1 |
.NET 6.0
- SuperSocket.Primitives (>= 2.0.2-beta.1)
- SuperSocket.Server.Abstractions (>= 2.0.2-beta.1)
- Microsoft.Extensions.Configuration (>= 8.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 8.0.0)
- System.Text.Json (>= 8.0.5)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 8.0.0)
.NET 9.0
- System.Text.Json (>= 8.0.5)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 8.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 8.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Configuration (>= 8.0.0)
- SuperSocket.Server.Abstractions (>= 2.0.2-beta.1)
- SuperSocket.Primitives (>= 2.0.2-beta.1)
.NET 8.0
- System.Text.Json (>= 8.0.5)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 8.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 8.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.0)
- SuperSocket.Server.Abstractions (>= 2.0.2-beta.1)
- SuperSocket.Primitives (>= 2.0.2-beta.1)
- Microsoft.Extensions.Configuration (>= 8.0.0)
.NET 7.0
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 8.0.0)
- System.Text.Json (>= 8.0.5)
- SuperSocket.Server.Abstractions (>= 2.0.2-beta.1)
- Microsoft.Extensions.Configuration (>= 8.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 8.0.0)
- SuperSocket.Primitives (>= 2.0.2-beta.1)
Version | Downloads | Last updated |
---|---|---|
2.0.2-beta.1 | 1 | 6/6/2025 |
2.0.1 | 1 | 6/6/2025 |
2.0.0 | 1 | 6/6/2025 |
2.0.0-beta.31 | 0 | 4/2/2025 |
2.0.0-beta.30 | 0 | 1/26/2025 |
2.0.0-beta.29 | 0 | 1/14/2025 |
2.0.0-beta.28 | 0 | 11/2/2024 |
2.0.0-beta.27 | 0 | 9/30/2024 |
2.0.0-beta.26 | 0 | 8/31/2024 |
2.0.0-beta.25 | 0 | 8/21/2024 |
2.0.0-beta.24 | 0 | 6/29/2024 |
2.0.0-beta.23 | 0 | 6/1/2024 |
2.0.0-beta.22 | 0 | 5/25/2024 |
2.0.0-beta.21 | 0 | 5/4/2024 |
2.0.0-beta.20.448 | 0 | 4/14/2024 |
2.0.0-beta.18 | 0 | 8/30/2023 |
2.0.0-beta.17 | 0 | 6/4/2023 |
2.0.0-beta.16 | 0 | 5/10/2023 |
2.0.0-beta.15 | 0 | 3/5/2023 |
2.0.0-beta.14 | 0 | 2/21/2023 |
2.0.0-beta.13 | 0 | 1/17/2023 |
2.0.0-beta.12 | 0 | 10/30/2022 |
2.0.0-beta.11 | 0 | 5/6/2022 |
2.0.0-beta.10 | 0 | 5/29/2021 |
2.0.0-beta.9 | 0 | 5/26/2021 |
2.0.0-beta.8 | 0 | 1/23/2021 |