SuperSocket.Primitives
2.1.0
dotnet add package SuperSocket.Primitives --version 2.1.0
NuGet\Install-Package SuperSocket.Primitives -Version 2.1.0
<PackageReference Include="SuperSocket.Primitives" Version="2.1.0" />
<PackageVersion Include="SuperSocket.Primitives" Version="2.1.0" />
<PackageReference Include="SuperSocket.Primitives" />
paket add SuperSocket.Primitives --version 2.1.0
#r "nuget: SuperSocket.Primitives, 2.1.0"
#:package SuperSocket.Primitives@2.1.0
#addin nuget:?package=SuperSocket.Primitives&version=2.1.0
#tool nuget:?package=SuperSocket.Primitives&version=2.1.0
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 serverMcpHttpServer: HTTP-based MCP with SSE supportMcpStdioServer: Standard I/O MCP for local agentsMcpWebSocketServer: 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
KeepAliveproperty 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
LocalEndPointproperty for client-side endpoint binding NoDelayenabled by default for improved low-latency scenarios- Virtual
ConfigureSocketmethod 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
serverOptionsby name - Improved flexibility in multi-server scenarios
Command System Enhancements
- Public
IWebSocketCommandMiddlewareinterface 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
- Add reference to
SuperSocket.MCPpackage - Choose your transport (TCP, HTTP, WebSocket, or stdio)
- Implement MCP command handlers using SuperSocket's command framework
- Configure MCP server with appropriate options
To Use HTTP Keep-Alive/SSE
- Set
KeepAlive = truein HTTP request/response handling - For SSE: Use
SseSessionExtensionsfor event streaming - 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 | Versions 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. |
-
net10.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.0)
- SuperSocket.ProtoBase (>= 2.1.0)
-
net6.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.0)
- SuperSocket.ProtoBase (>= 2.1.0)
-
net7.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.0)
- SuperSocket.ProtoBase (>= 2.1.0)
-
net8.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.0)
- SuperSocket.ProtoBase (>= 2.1.0)
-
net9.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.0)
- SuperSocket.ProtoBase (>= 2.1.0)
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 |