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:

  1. In ISuperSocketHostBuilder<TReceivePackage> interface:

    • UsePipelineFilter<TPipelineFilter>() method
  2. In HostBuilderExtensions class:

    • AsSuperSocketHostBuilder<TReceivePackage, TPipelineFilter>() method
  3. In MultipleServerHostBuilder class:

    • AddServer<TReceivePackage, TPipelineFilter>() method
    • AddServer<TSuperSocketService, TReceivePackage, TPipelineFilter>() method
  4. In SuperSocketHostBuilder class and static methods:

    • UsePipelineFilter<TPipelineFilter>() method
    • Create<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

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

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