A simple, high-performance, and reliable WebSocket server and client library written in Go, supporting TCP, KCP, and Unix domain sockets.
GWS is a WebSocket server and client library written in Go, designed for building high-concurrency real-time applications. It solves the need for a performant, reliable, and easy-to-use WebSocket implementation that supports various transport protocols like TCP, KCP, and Unix domain sockets.
Go developers building real-time systems such as API gateways, chat applications, online games, push notification services, and streaming platforms that require WebSocket communication.
Developers choose GWS for its combination of simplicity, high performance, and standards compliance. Its event-driven API reduces boilerplate, while its optimized internals ensure low latency and efficient resource usage under heavy load.
simple, fast, reliable websocket server & client, supports running over tcp/kcp/unix domain socket. keywords: ws, proxy, chat, go, golang...
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The Event interface (OnOpen, OnMessage, etc.) mirrors WebSocket lifecycles, reducing boilerplate code as shown in the quick start example.
Optimized for low latency and high throughput with benchmarks showing 5.2M ops/sec for writes and aggressive buffer reuse per the README.
Passes all Autobahn test cases and complies with RFC 6455/7692, ensuring reliable interoperability in production environments.
Broadcaster reuses compressed frames for fan-out, minimizing CPU and memory overhead when sending messages to multiple clients.
Developers must carefully manage goroutines for ReadLoop and error handling, which can lead to leaks if not implemented correctly per the Attention section.
Missing built-in reconnection, authentication hooks, or session management, requiring custom code for production-grade resilience.
Smaller community and fewer third-party integrations compared to alternatives like Gorilla WebSocket, though it has basic proxy and KCP support.