Skip to content

Releases: kerryjiang/SuperSocket

SuperSocket 2.1.0

04 Apr 05:18

Choose a tag to compare

Overview

SuperSocket 2.1.0 is a significant update that introduces groundbreaking Model Context Protocol (MCP) support, advanced HTTP capabilities with Keep-Alive and Server-Sent Events (SSE), and .NET 10 compatibility. This release expands SuperSocket's use cases into AI agent communication, real-time web applications, and modern cloud-native scenarios while enhancing client flexibility and multi-server hosting capabilities.

Major Features

Model Context Protocol (MCP) Support

SuperSocket now provides comprehensive support for the Model Context Protocol (MCP), enabling seamless integration with AI agents and language models.

Core MCP Features

  • Full MCP specification compliance for AI agent communication
  • Multiple transport options: TCP, HTTP, WebSocket, and stdio
  • Native command system integration for MCP request handling
  • JSON-RPC 2.0 protocol support with type-safe message handling
  • Resource, tool, and prompt management capabilities

MCP Transport Implementations

  • TCP/WebSocket MCP Server: Traditional socket-based MCP communication
  • HTTP MCP Server: RESTful MCP with POST request handling and SSE notifications
  • Stdio MCP Server: Standard input/output for local process communication
  • Shared command infrastructure: Unified handler registry across all transports

Sample Projects

Four comprehensive MCP samples demonstrating different use cases:

  • McpServer: Basic TCP/WebSocket MCP server
  • McpHttpServer: HTTP-based MCP with SSE support
  • McpStdioServer: Standard I/O MCP for local agents
  • McpWebSocketServer: Dedicated WebSocket MCP implementation

HTTP Keep-Alive and Server-Sent Events (SSE)

Enhanced HTTP capabilities for building modern web applications and real-time communication.

HTTP Keep-Alive Support

  • Persistent connection management for improved performance
  • Configurable keep-alive timeouts and connection limits
  • HTTP/1.1 compliant connection reuse
  • Automatic connection cleanup and lifecycle management

Server-Sent Events (SSE)

  • Full SSE specification support (text/event-stream)
  • Event streaming capabilities with named events
  • Heartbeat and reconnection support for reliable delivery
  • SSE-specific session management and encoding
  • Integration with MCP for real-time AI agent notifications

Configuration Options

  • KeepAlive property for enabling/disabling persistent connections
  • Timeout and heartbeat configuration
  • Custom event encoding and formatting

.NET 10 Support

  • Added .NET 10.0 target framework across all projects
  • Forward compatibility with the latest .NET runtime
  • Removed legacy mobile targets (net8.0-ios, net8.0-android, net8.0-macos, net8.0-tvos)
  • Updated SDK version to 9.0.0 for build infrastructure

API Enhancements

Socket Client Improvements

Enhanced SocketConnector Extensibility

  • Exposed LocalEndPoint property for client-side endpoint binding
  • NoDelay enabled by default for improved low-latency scenarios
  • Virtual ConfigureSocket method for custom socket configuration
  • Better support for source IP binding and socket option customization

Improved Client Flexibility

  • Enhanced constructor options for endpoint binding
  • Better extensibility through virtual methods
  • Improved documentation and XML comments

Multiple Server Setup Optimization

  • Streamlined API for hosting multiple server instances
  • Support for multiple instances of the same server type
  • Automatic server configuration loading from serverOptions by name
  • Improved flexibility in multi-server scenarios

Command System Enhancements

  • Public IWebSocketCommandMiddleware interface for custom middleware
  • Inherited filter support for commands from base classes
  • Better command pipeline integration with WebSocket messages
  • Connection token propagation for cancellation scenarios

Bug Fixes and Improvements

Stability Improvements

  • Fixed unit test stability issues in TestMultipleServerHost
  • Resolved SSE test data reading strategy issues
  • Fixed HTTP Keep-Alive test hanging problems with proper timeout handling
  • Improved connection cleanup when KeepAlive=false

Build and Compatibility

  • Fixed .NET 8.0 compatibility issues in unit test projects
  • Restored .NET 9.0 target framework support across projects
  • Fixed build warnings (xUnit1051) in test classes
  • Updated sample projects with correct target frameworks

Documentation

  • Enhanced XML documentation throughout the codebase
  • Added comprehensive README files for MCP samples
  • Updated main README with MCP and SSE features
  • Improved code comments for better IntelliSense experience

Breaking Changes

None - This release maintains full backward compatibility with v2.0.2

Migration Guide

No migration steps required. Upgrading from v2.0.2 to v2.1.0 is seamless.

To Use New MCP Features

  1. Add reference to SuperSocket.MCP package
  2. Choose your transport (TCP, HTTP, WebSocket, or stdio)
  3. Implement MCP command handlers using SuperSocket's command framework
  4. Configure MCP server with appropriate options

To Use HTTP Keep-Alive/SSE

  1. Set KeepAlive = true in HTTP request/response handling
  2. For SSE: Use SseSessionExtensions for event streaming
  3. Configure heartbeat and timeout options as needed

To Use Enhanced Socket Client

// Bind to specific local endpoint
var connector = new SocketConnector(new IPEndPoint(IPAddress.Any, 0));

// Or customize socket configuration
public class CustomConnector : SocketConnector
{
    protected override void ConfigureSocket(Socket socket)
    {
        base.ConfigureSocket(socket);
        // Add custom socket options
    }
}

NuGet Packages Updated

All SuperSocket 2.1.0 packages are available on NuGet:

  • SuperSocket
  • SuperSocket.Client
  • SuperSocket.Client.Proxy
  • SuperSocket.ProtoBase
  • SuperSocket.Server
  • SuperSocket.Server.Abstractions
  • SuperSocket.WebSocket
  • SuperSocket.WebSocket.Server
  • SuperSocket.Command
  • SuperSocket.Udp
  • SuperSocket.Kestrel
  • NEW: SuperSocket.MCP
  • NEW: SuperSocket.Http

What's Next

Future releases will continue to enhance MCP capabilities, add more protocol support, and improve performance. Stay tuned for:

  • Enhanced MCP resource and tool management
  • Additional transport protocol options
  • Performance optimizations for high-throughput scenarios
  • Extended HTTP/2 and HTTP/3 support

Acknowledgments

Special thanks to all contributors who made this release possible, especially:

  • AI-assisted development with GitHub Copilot
  • Community feedback and bug reports
  • Testing and validation efforts

Resources


Released: April 2026

SuperSocket 2.0.2

10 Jul 02:19

Choose a tag to compare

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> interface
  • HostBuilderExtensions methods
  • MultipleServerHostBuilder configurations
  • SuperSocketHostBuilder static and instance methods

Connection and Session Management Improvements

IDisposable Implementation

  • Added IDisposable interfaces to IConnection and IEasyClient
  • 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) to SendAsync 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

Links

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

SuperSocket 2.0.1

24 May 04:23

Choose a tag to compare

Overview

SuperSocket 2.0.1 is a maintenance release that addresses several stability issues, improves performance, enhances dependency injection support, and adds more comprehensive documentation through XML comments.

Key Improvements

Stability and Bug Fixes

  • Fixed the middleware session handling for proper session rejection (#796)
  • Resolved several issues with SocketSender that were causing ArgumentOutOfRangeException (#794, #65af03d)
  • Used pipe scheduler to run continuation actions in SocketSender for better reliability (#798)
  • Fixed order-dependent issue with UseInProcSessionContainer() which now correctly works when not placed last in the fluent configuration chain (#788)
  • Default to IPv4 for unsigned address family to ensure consistent behavior (193e836)

Performance Improvements

  • Added ConfigureAwait for SendAsync to avoid context switching and improve performance (#792)
  • Various socket handling optimizations (1f701b1)

Enhanced Dependency Injection

  • Modified pipeline filter constructor to allow dependency injection, improving flexibility when creating custom filters (#797)
  • Fixed issue where application builder (not web application builder) could not be used as SuperSocket application builder (c5d66c4)

Developer Experience

  • Added .editorconfig for consistent coding style across the project (#791)
  • Added comprehensive XML comments to improve API documentation (0ba13d2, 63c6711, 6290d9e)
  • Exposed StartReceive method as protected to allow more customization in derived classes (4e18f71)
  • Added release notes in NuGet packages for better visibility of changes (2daa441)

Project Structure

  • Removed ProtoBuf from the main repository and moved it to a separate repository (351a4a4)
  • Added new components to the README (d7b7d6d)
  • Updated project description for clarity (b7e0b1c)

Testing

Contributors

  • Kerry Jiang
  • hyabean

Upgrading

This release maintains compatibility with SuperSocket 2.0.0. Users are encouraged to update to this version to benefit from the stability improvements and bug fixes.

Links

SuperSocket 2.0 Released: A New Era for .NET Socket Server Framework

30 Apr 06:31

Choose a tag to compare

April 20, 2025 - The SuperSocket Team is proud to announce the official release of SuperSocket 2.0, a major milestone for this high-performance, extensible socket server application framework for .NET. After several years of development following the initial preview releases, SuperSocket 2.0 represents a complete reimagining of the framework, built from the ground up for modern .NET.

SuperSocket 2.0 cake

A Decade of Evolution

SuperSocket has come a long way since its inception in 2008. Starting as a solution to address the limitations of existing socket server implementations, the project has grown into a robust, feature-rich framework trusted by developers worldwide. With version 2.0, SuperSocket continues its tradition of excellence while embracing modern development practices and technologies.

Key Improvements in SuperSocket 2.0

  1. Modern .NET Foundation: Completely rebuilt on modern .NET, SuperSocket 2.0 takes full advantage of the platform's performance improvements, cross-platform capabilities, and modern language features.

  2. High-Performance Pipeline Architecture: Leveraging System.IO.Pipelines for zero-copy data processing, SuperSocket 2.0 delivers significantly improved throughput and reduced memory consumption when handling network data.

  3. Cloud-Native Support: Designed with containerization in mind, SuperSocket 2.0 runs seamlessly in Docker and Kubernetes environments, making it an ideal choice for cloud-native applications.

  4. Middleware System: The new middleware architecture provides superior extensibility while simplifying the core codebase, allowing developers to easily customize the request processing pipeline.

  5. Enhanced Protocol Flexibility: The redesigned pipeline filters make protocol implementation more intuitive and efficient, with built-in support for TCP, UDP, WebSocket, and custom protocols.

  6. Improved Configuration: Taking advantage of .NET's configuration system, SuperSocket 2.0 offers more flexible options for configuring server instances through various providers.

  7. Advanced Logging Integration: Seamless integration with .NET's logging abstractions enables better observability and diagnostics for production applications.

  8. Modular Design: The new package structure provides a more granular approach, allowing developers to include only the components they need.

Package Structure

SuperSocket 2.0 is organized into a set of focused NuGet packages:

  • SuperSocket.ProtoBase: Core protocol definition and processing components
  • SuperSocket.Primitives: Foundational types and utilities
  • SuperSocket.Connection: Connection management abstractions and implementations
  • SuperSocket.Server: Server implementation and infrastructure
  • SuperSocket.Command: Command-based processing model
  • SuperSocket.WebSocket: WebSocket protocol implementation
  • SuperSocket.Client: Client components for connecting to socket servers
  • SuperSocket.Udp: UDP protocol support
  • And more specialized packages for specific scenarios

Looking Ahead

The SuperSocket team is committed to continually improving the framework based on community feedback and emerging technologies. The roadmap for the remainder of 2025 includes expanded documentation, performance optimizations, and addressing feature requests from the community.

Get Started Today

SuperSocket 2.0 is available now on NuGet. Visit the official documentation to learn more and get started with your socket server applications.

"With SuperSocket 2.0, we've rebuilt the framework from the ground up to provide the performance, flexibility, and developer experience that modern .NET applications demand," said Kerry Jiang, the creator of SuperSocket. "We're excited to see what our community builds with these new capabilities."

SuperSocket 2.0 Preview 1

24 May 02:17

Choose a tag to compare

Pre-release

First preview of SuperSocket 2.0.