gobwas/ws

A tiny WebSocket library for Go.

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 26 minutes ago
Added to GitGenius on September 10th, 2026
Created on January 22nd, 2017
Open Issues & Pull Requests: 29 (+0)
GitHub issues: Enabled
Number of forks: 385
Total Stargazers: 6,466 (+0)
Total Subscribers: 121 (+0)

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Issue API getrepoissuespagesummary failed: 429 Rate limit exceeded. Please try again later.

Detailed Description

ws is a WebSocket library for Go that implements RFC6455.

The library addresses the problem of buffer reuse across WebSocket connections, which existing implementations do not support clearly. It provides a low-level API that allows developers to control packet handling and reuse buffers between connections without forcing a single usage pattern. For developers who prefer not to work directly with the protocol, the wsutil package offers higher-level wrappers and helpers that enable quick setup without deep protocol knowledge.

The tool suits high-load services that need to manage many concurrent connections and control resource allocation carefully. The zero-copy upgrade mechanism eliminates intermediate allocations during the HTTP upgrade handshake by processing non-WebSocket headers in place using registered callbacks. Developers choosing between abstraction levels can use the low-level API for maximum control or the wsutil package for convenience. The library also includes wsflate for Permessage-Deflate compression support, compatible with both low-level and high-level usage patterns.

The project maintains API stability through semantic versioning, with the v1 tag guaranteeing no breaking changes during improvements or refactoring. The implementation passes the Autobahn Test Suite for RFC6455 compliance. Example applications are maintained in a separate repository to demonstrate usage patterns across different abstraction levels.