Overview of the centrifuge websocket package
masterThe centrifuge websocket package is a fork of the Gorilla WebSocket library, specifically adapted for Centrifuge's requirements. It maintains the original copyrights of the Gorilla authors while introducing specific optimizations and feature changes.
Key differences from the original Gorilla WebSocket include:
- HTTP/2 Support: Supports WebSocket over HTTP/2 (RFC 8441) on the server side.
- Performance: Optimized upgrade process (reducing allocations from 9 to 3, as seen in
BenchmarkUpgrade). - Protocol Handling: The selected subprotocol is not stored internally; instead, it is returned during the
UpgradeorDialoperations. - Removed Features:
- No custom
ProxyinClient. - No concurrent use best-effort detection.
- No possibility to set a custom
CloseHandler.
- No custom
- Other: Includes various lint fixes.