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

Packages Downloads
SuperSocket.Client
SuperSocket client library
44
SuperSocket.Client
SuperSocket client library
41
SuperSocket.Server
SuperSocket server hosting library.
41
SuperSocket.Server.Abstractions
Package Description
40
SuperSocket.Client
SuperSocket client library
39
SuperSocket.Channel
SuperSocket library to abstract underlying communications as channel with pipeline.
39
SuperSocket.Server
SuperSocket server hosting library.
39
SuperSocket.Connection
SuperSocket library to abstract underlying communications as connection with pipeline.
39
SuperSocket.WebSocket
SuperSocket WebSocket protocol implementation.
38
SuperSocket.Primitives
SuperSocket primitive interfaces and classes.
38
SuperSocket.Server.Abstractions
Package Description
38
SuperSocket.Client
SuperSocket client library
37
SuperSocket.WebSocket
SuperSocket WebSocket protocol implementation.
37
SuperSocket.Server
SuperSocket server hosting library.
37

Version Downloads Last updated
2.0.2-beta.1 7 05/29/2025
2.0.1 8 05/29/2025
2.0.0 14 04/23/2025
2.0.0-beta.31 10 04/03/2025
2.0.0-beta.30 17 01/28/2025
2.0.0-beta.29 21 01/19/2025
2.0.0-beta.28 24 11/05/2024
2.0.0-beta.27 28 10/01/2024
2.0.0-beta.26 28 09/06/2024
2.0.0-beta.25 24 08/22/2024
2.0.0-beta.24 33 06/30/2024
2.0.0-beta.23 27 06/10/2024
2.0.0-beta.22 37 06/10/2024
2.0.0-beta.21 28 06/10/2024
2.0.0-beta.20.448 34 06/10/2024
2.0.0-beta.18 30 06/10/2024
2.0.0-beta.17 32 06/10/2024
2.0.0-beta.16 33 06/10/2024
2.0.0-beta.15 34 06/10/2024
2.0.0-beta.14 34 06/10/2024
2.0.0-beta.13 33 06/10/2024
2.0.0-beta.12 35 06/10/2024
2.0.0-beta.11 36 06/10/2024
2.0.0-beta.10 29 06/10/2024
2.0.0-beta.9 34 06/10/2024
2.0.0-beta.8 33 06/10/2024
1.7.0.17 38 06/10/2024
1.7.0.16 35 06/10/2024
1.7.0.15 28 06/10/2024
1.7.0.14 33 06/10/2024
1.7.0.13 29 06/10/2024
1.7.0.12 34 06/10/2024
1.7.0.11 38 06/10/2024
1.7.0.10 36 06/10/2024
1.7.0.9 35 06/10/2024
1.7.0.8 37 06/10/2024
1.7.0.7 32 06/10/2024
1.7.0.5 30 06/09/2024
1.7.0-beta7 29 06/10/2024
1.7.0-beta6 31 06/10/2024