A .NET/C# websocket client library with built-in reconnection, error handling, and Reactive Extensions support.
Websocket .NET client is a C# library that provides a managed wrapper around the native `ClientWebSocket` class. It simplifies websocket communication by adding automatic reconnection, error handling, and integration with Reactive Extensions (Rx.NET) for reactive programming. The library solves the problem of building reliable real-time clients without manually managing connection state and recovery.
.NET developers building applications that require persistent, real-time connections to websocket servers, such as financial data feeds, chat applications, or live notifications.
Developers choose this library because it reduces boilerplate code for reconnection and error handling, offers first-class Rx.NET support for reactive streams, and provides high performance with Channels-based message queuing, all while maintaining compatibility across modern .NET platforms.
🔧 .NET/C# websocket client library
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Automatically handles connection losses with configurable timeouts and error-based slowdowns, reducing manual recovery code as shown in the ReconnectTimeout and ErrorReconnectTimeout settings.
Exposes Observable streams like MessageReceived and ReconnectionHappened, enabling event-driven programming with Rx.NET for seamless real-time data processing.
Uses Channels for efficient sending queues, which is ideal for high-frequency data streams and prevents message loss under load.
Allows custom factory methods to configure native ClientWebSocket settings such as KeepAliveInterval and Proxy, offering deep customization while abstracting complexity.
After reconnections, sessions are not persisted, forcing developers to manually resubscribe to topics or channels, which adds error-prone code and complexity.
Using async/await in subscriptions requires careful handling with Rx.NET operators like Concat or Merge, as explained in the README, which can lead to concurrency issues if mishandled.
Tight coupling with Reactive Extensions means a steeper learning curve for teams not already using Rx.NET, and it introduces an additional dependency that might be unnecessary for simpler projects.