coder/websocket

Minimal and idiomatic WebSocket library for Go

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 8 minutes ago
Added to GitGenius on September 12th, 2026
Created on August 13th, 2018
Open Issues & Pull Requests: 71 (+0)
GitHub issues: Enabled
Number of forks: 373
Total Stargazers: 5,463 (+1)
Total Subscribers: 50 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 8.8 hours
Mean response time: 56.0 days
90th percentile: 242.0 days
Tracked items: 38

Most active contributors

Sign in to see contributor activity.

Related repositories by overlapping contributors

How this project is maintained

Around half of the issues opened in the past year never receive a reply. 100% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. Only 2% of issues opened in the past year have been closed. Three people close 85% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 25
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 659 days
Stale 30+ days: 24
Stale 90+ days: 18

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • enhancement (12)
  • bug (2)
  • needs-info (2)
  • needs-response (1)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

websocket is a minimal and idiomatic WebSocket library for Go.

The library addresses the need for a lightweight WebSocket implementation that integrates naturally with Go's standard patterns. It provides first-class context.Context support, zero dependencies, and passes the WebSocket autobahn-testsuite in full. The implementation offers zero-allocation reads and writes, concurrent writes, and RFC 7692 permessage-deflate compression. Additional capabilities include JSON helpers via a wsjson subpackage, close handshake support, ping-pong functionality, and a net.Conn wrapper for compatibility with code expecting standard network interfaces. The library can compile to WebAssembly.

Developers should choose this library when they need a straightforward WebSocket implementation without external dependencies or when they prefer idiomatic Go APIs. It suits projects ranging from simple real-time communication to full-stack applications, with production examples provided for both echo and chat use cases. Compared to gorilla/websocket, this library trades some features—gorilla offers prepared writes and configurable buffer sizes—for a simpler API and zero dependencies.

The project maintains an active roadmap addressing performance and usability enhancements. Planned work includes assembly-level optimization for WebSocket masking, HTTP/2 support, graceful shutdown helpers, and ping-pong heartbeat utilities. The maintainers track issues systematically and have documented specific enhancement requests with associated issue numbers.