.NET WebSocket libraries — comparison guide

A neutral, source-cited survey of the WebSocket libraries available to .NET developers in 2026: sgcWebSockets .NET, System.Net.WebSockets, ASP.NET Core SignalR, WebSocket-Sharp, Fleck, and Watson WebSocket. Every feature claim links to the project's own documentation.

Six libraries to choose from

A one-paragraph summary of each library, with a link to the official documentation or repository.

System.Net.WebSockets

Microsoft · MIT (part of .NET)

The low-level WebSocket API built into .NET itself. Provides ClientWebSocket for clients and a server abstract WebSocket class consumed by ASP.NET Core, Kestrel, and HttpListener. RFC 6455 framing and per-message-deflate (WebSocketDeflateOptions) are first-class.

Official page

ASP.NET Core SignalR

Microsoft · MIT (part of ASP.NET Core)

Microsoft's high-level real-time framework. Built on top of WebSocket, Server-Sent Events, and Long Polling (in that fall-back order); exposes a hub RPC API rather than raw frames. JSON or MessagePack hub protocols; scales via Azure SignalR Service or a Redis backplane.

Official page

WebSocket-Sharp

sta.blockhead · MIT

Long-running open-source C# WebSocket client and server. Targets .NET Framework 3.5 and later (and Mono), implements RFC 6455 with per-message-deflate (no context takeover). The GitHub repository has no tagged releases — users typically take the latest master or pin to a commit hash.

Official page

Fleck

Jason Staten / community · MIT

Server-only C# WebSocket library that does not depend on HttpListener or HTTP.SYS — it listens on a raw socket. Has no client side, no HTTP server, and no built-in TLS termination outside the X509 certificate path. Latest tagged release is 0.14.0 from October 2016.

Official page

Watson WebSocket

Joel Christner · MIT

Async C# WebSocket client and server with an event-driven API. Targets .NET Framework 4.8 and .NET 7.0. The repository was archived in May 2024 with a note that it has been integrated into Watson Webserver.

Official page

Side-by-side feature comparison

A check () means the project documents native support. A dash () means the project does not provide it natively. A tilde (~) means partial / via add-on / not explicitly documented — see the Sources section for what we could verify.

Protocols, transport, licensing

16 rows
Feature sgcWebSockets .NET System.Net.WebSockets ASP.NET Core SignalR WebSocket-Sharp Fleck Watson WebSocket
WebSocket Client RFC 6455 client
WebSocket Server RFC 6455 server
TLS 1.3 TLS 1.3 supported by the provided transport ~ ~
HTTP/2 Client Native HTTP/2 client (RFC 7540 / 9113) ~
MQTT MQTT 3.1.1 / 5.0 client built in
AMQP AMQP 0.9.1 / 1.0 client built in
STOMP STOMP 1.0 / 1.2 client built in
WAMP WAMP v1 / v2 client built in
Server push / streaming Long-lived push or streaming connection
Auto-reconnect Built-in client auto-reconnect / watchdog
per-message-deflate (RFC 7692) WebSocket compression extension ~ ~
Multi-platform Win / macOS / Linux / iOS / Android ~
Commercial use allowed Licence permits closed-source commercial use
Source code available Library source is visible to the developer
Active maintenance Release or tagged activity in last 12–18 months ~
Licence model Licence type Commercial MIT (part of .NET) MIT (part of ASP.NET Core) MIT MIT MIT
Documented native support Not provided natively ~ Partial / via add-on / unverified

Honest fit for each library

Every library here has a real audience. The right pick depends on your runtime targets, your protocol breadth, and whether you want an RPC-style hub API or raw WebSocket frames.

Choose sgcWebSockets .NET

Pick sgcWebSockets .NET when you need WebSocket alongside MQTT, AMQP, STOMP, WAMP, HTTP/2, and AI/LLM clients out of one package; when you target an older runtime (.NET Framework 2.0+, .NET Core 1.0) that newer libraries dropped; when you want the same API surface in both Delphi and .NET projects; or when you specifically need WebRTC server pieces (signalling, ICE, TURN) on .NET.

Choose System.Net.WebSockets

Pick System.Net.WebSockets when you already use ASP.NET Core / Kestrel for hosting and want zero extra dependencies; when you want a low-level API you control end-to-end; when WebSocket is the only protocol you need; or when you are building your own protocol on top of the bare frames.

Choose ASP.NET Core SignalR

Pick SignalR when both your server and your clients are .NET (or you use the JavaScript / Java / Python SignalR clients), when you prefer an RPC programming model (hubs and methods) over raw WebSocket frames, when you need automatic transport fall-back to SSE / Long Polling for restricted networks, or when you plan to scale on Azure SignalR Service.

Choose WebSocket-Sharp

Pick WebSocket-Sharp when you need a permissively-licensed (MIT) WebSocket client and server that runs on .NET Framework 3.5 / Mono targets, and you are happy pinning to a commit hash and vendoring the source into your build.

Choose Fleck

Pick Fleck when you need a tiny, MIT-licensed WebSocket server that does not require HTTP.SYS, that runs on legacy Windows servers (7 / 2008), and where you provide your own TLS certificate. Suitable for embedded scenarios and small services.

Choose Watson WebSocket

Pick Watson WebSocket when you already use Joel Christner's Watson Webserver / Watson TCP family and want to keep the matched API style. New projects should consider Watson Webserver (the active successor) or one of the other libraries on this page.

Moving to sgcWebSockets .NET — what differs

Short notes on the API and feature differences if you are switching from one of the libraries above. Not adversarial — just the practical mapping.

Moving from System.Net.WebSockets

System.Net.WebSockets gives you the wire protocol; sgcWebSockets .NET adds MQTT / AMQP / STOMP / WAMP sub-protocols, HTTP/2, auto-reconnect, watchdog, the AI/LLM and exchange-API clients, and the WebRTC server pieces on top. If you wrote a thin wrapper around ClientWebSocket, the migration is mostly a rename plus event-handler porting.

Moving from ASP.NET Core SignalR

SignalR speaks its own framing protocol over WebSocket. sgcWebSockets implements the SignalR client wire protocol (TsgcWSAPI_SignalR and TsgcWSAPI_SignalRCore), so a Delphi or .NET client built with sgcWebSockets can talk to an existing ASP.NET Core SignalR server. If you are migrating a full SignalR back-end to raw WebSocket, expect to redesign the hub-method dispatch as your own message envelope.

Moving from WebSocket-Sharp

WebSocket-Sharp's WebSocket client and WebSocketServer map closely to sgcWebSockets' TsgcWebSocketClient and TsgcWebSocketServer. Event names differ (OnMessage exists in both; OnError and OnClose have similar signatures). Sub-protocols (MQTT / AMQP / STOMP / WAMP) are sgcWebSockets-only.

Moving from Fleck

Fleck is server-only. If your application has both a Fleck server and a separate client library, sgcWebSockets .NET unifies both. The Fleck handler-based API (WebSocketServer.Start(socket => ...)) maps to sgcWebSockets' event-based TsgcWebSocketServer with OnMessage / OnConnect handlers.

Moving from Watson WebSocket

The Watson client/server event surface (MessageReceived, ClientConnected, ClientDisconnected) maps cleanly to sgcWebSockets' OnMessage / OnConnect / OnDisconnect. Sub-protocols and the AI/LLM API clients are sgcWebSockets-only.

Every claim, linked

Each cell in the matrix above traces to one of these official documentation pages, repositories, or release notes. All URLs were HEAD-checked at the time of writing.

SourceURL
sgcWebSockets — product pagehttps://www.esegece.com/products/websockets/
sgcWebSockets — .NET feature matrixhttps://www.esegece.com/products/websockets/features/feature-matrix-net/
RFC 6455 — The WebSocket Protocolhttps://datatracker.ietf.org/doc/html/rfc6455
RFC 7692 — Compression Extensions for WebSocket (per-message-deflate)https://datatracker.ietf.org/doc/html/rfc7692
System.Net.WebSockets — namespace documentationhttps://learn.microsoft.com/en-us/dotnet/api/system.net.websockets
ClientWebSocket — .NET API referencehttps://learn.microsoft.com/en-us/dotnet/api/system.net.websockets.clientwebsocket
WebSocketDeflateOptions — .NET per-message-deflate supporthttps://learn.microsoft.com/en-us/dotnet/api/system.net.websockets.websocketdeflateoptions
ASP.NET Core SignalR — overviewhttps://learn.microsoft.com/en-us/aspnet/core/signalr/introduction
SignalR repository (dotnet/aspnetcore)https://github.com/dotnet/aspnetcore
WebSocket-Sharp — GitHub repositoryhttps://github.com/sta/websocket-sharp
Fleck — GitHub repositoryhttps://github.com/statianzo/Fleck
Fleck — releases (0.14.0 in 2016)https://github.com/statianzo/Fleck/releases
Watson WebSocket — GitHub repository (archived)https://github.com/jchristn/WatsonWebsocket

Try sgcWebSockets .NET

Download the free Community edition and benchmark sgcWebSockets .NET against your current library on your own application.