SuperSocket.Primitives 2.1.0

dotnet add package SuperSocket.Primitives --version 2.1.0
                    
NuGet\Install-Package SuperSocket.Primitives -Version 2.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SuperSocket.Primitives" Version="2.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SuperSocket.Primitives" Version="2.1.0" />
                    
Directory.Packages.props
<PackageReference Include="SuperSocket.Primitives" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SuperSocket.Primitives --version 2.1.0
                    
#r "nuget: SuperSocket.Primitives, 2.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SuperSocket.Primitives@2.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SuperSocket.Primitives&version=2.1.0
                    
Install as a Cake Addin
#tool nuget:?package=SuperSocket.Primitives&version=2.1.0
                    
Install as a Cake Tool

Release Note: SuperSocket 2.1.0

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

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (5)

Showing the top 5 NuGet packages that depend on SuperSocket.Primitives:

Package Downloads
SuperSocket.Command

SuperSocket command pattern library providing a structured request processing framework with command discovery, dependency injection support, and flexible command dispatching based on message keys.

SuperSocket.SessionContainer

SuperSocket built-in session containers.

SuperSocket.WebSocket.Server

SuperSocket WebSocket server implementation enabling real-time bidirectional communication with WebSocket protocol support.

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.

SuperSocket.Udp

SuperSocket UDP support library providing socket handling and implementation for building UDP-based networking applications.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.1.0 28 4/5/2026
2.0.2 14,639 7/10/2025
2.0.2-beta.1 374 5/25/2025
2.0.1 4,857 5/24/2025
2.0.0 2,124 4/20/2025
2.0.0-beta.31 2,700 4/2/2025
2.0.0-beta.30 1,060 1/26/2025
2.0.0-beta.29 217 1/14/2025
2.0.0-beta.28 1,585 11/2/2024
2.0.0-beta.27 5,154 9/30/2024
2.0.0-beta.26 1,225 8/31/2024
2.0.0-beta.25 786 8/21/2024
2.0.0-beta.24 1,583 6/29/2024
2.0.0-beta.23 1,646 6/1/2024
2.0.0-beta.22 1,436 5/25/2024
2.0.0-beta.21 692 5/4/2024
2.0.0-beta.20.448 1,566 4/14/2024
2.0.0-beta.18 11,799 8/30/2023
2.0.0-beta.17 4,429 6/4/2023
2.0.0-beta.16 1,168 5/10/2023
Loading failed