SuperSocket.Connection 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.Connection.

Packages Downloads
SuperSocket.Server.Abstractions
Package Description
40
SuperSocket.Client
SuperSocket client library
39
SuperSocket.Server.Abstractions
Package Description
38
SuperSocket.Client
SuperSocket client library
36
SuperSocket.Server.Abstractions
Package Description
36
SuperSocket.Server.Abstractions
Package Description
35
SuperSocket.Client
SuperSocket client library
34
SuperSocket.Client
SuperSocket client library
33
SuperSocket.Server.Abstractions
SuperSocket library for server abstractions. It includes many interfaces and base implementation of SuperSocket server components. Users can extend server side base on this project.
33
SuperSocket.Client
SuperSocket client library
32
SuperSocket.Server.Abstractions
Package Description
32
SuperSocket.Server.Abstractions
SuperSocket library for server abstractions. It includes many interfaces and base implementation of SuperSocket server components. Users can extend server side base on this project.
30
SuperSocket.Client
SuperSocket client library
29
SuperSocket.Server.Abstractions
SuperSocket library for server abstractions. It includes many interfaces and base implementation of SuperSocket server components. Users can extend server side base on this project.
28
SuperSocket.Client
SuperSocket client library
28
SuperSocket.Client
SuperSocket client library
27
SuperSocket.Client
SuperSocket client library
24
SuperSocket.Server.Abstractions
SuperSocket library for server abstractions. It includes many interfaces and base implementation of SuperSocket server components. Users can extend server side base on this project.
22
SuperSocket.Client
SuperSocket client library
21

.NET 6.0

.NET 8.0

.NET 9.0

.NET 9.0

.NET 9.0

.NET 9.0

.NET 9.0

.NET 8.0

.NET 7.0

.NET 8.0

.NET 8.0

.NET 8.0

Version Downloads Last updated
2.0.2-beta.1 7 05/29/2025
2.0.1 7 05/29/2025
2.0.0 9 04/24/2025
2.0.0-beta.31 8 04/14/2025
2.0.0-beta.30 16 01/27/2025
2.0.0-beta.29 15 01/21/2025
2.0.0-beta.28 24 11/03/2024
2.0.0-beta.27 30 10/12/2024
2.0.0-beta.26 28 09/03/2024
2.0.0-beta.25 22 09/06/2024
2.0.0-beta.24 36 07/07/2024
2.0.0-beta.23 30 06/08/2024
2.0.0-beta.22 39 06/10/2024
2.0.0-beta.21 36 06/10/2024
2.0.0-beta.20.448 32 06/10/2024