websocket-sharp is a C# implementation of the WebSocket protocol for building client and server applications.
The tool addresses the need for WebSocket communication in .NET environments by providing a complete implementation of RFC 6455. It handles the WebSocket handshake, message framing, and connection lifecycle, allowing developers to establish bidirectional communication channels between clients and servers. The implementation supports both text and binary message types, with events for connection open, message receipt, and error conditions.
Developers should choose this tool if they are building .NET applications requiring WebSocket functionality and prefer a self-contained library over platform-provided alternatives. It suits projects targeting .NET Framework or compatible environments like Mono, and works with Unity by adding the compiled assembly to the project plugins folder. The tool supports per-message compression, secure connections, HTTP authentication, proxy connections, and custom headers including cookies and origin validation. It is available both as a self-built assembly and through NuGet as a prerelease package.
The project maintains a single production branch for releases while preserving historical branches for obsolete WebSocket protocol drafts that are no longer maintained. Development uses MonoDevelop for building the single websocket-sharp.dll assembly, with straightforward compilation from the provided solution file.