gorilla /websocket
Package gorilla/websocket is a fast, well-tested and widely used WebSocket implementation for Go.
★ 24,882⑂ 3,582👁 368⑃ 356● 667▤ 11
-1
日增长
-3
周增长
+8
月增长
24,882
stars
3,582
forks
368
watchers
356
prs
667
issues
11
releases
README
Gorilla WebSocket
Gorilla WebSocket is a Go implementation of the
WebSocket protocol.
Documentation
API Reference
Chat example
Command example
Client and server example
File watch example
Status
The Gorilla WebSocket package provides a complete and tested implementation of
the WebSocket protocol. The
package API is stable.
Installation
go get github.com/gorilla/websocket
Protocol Compliance
The Gorilla WebSocket package passes the server tests in the Autobahn Test
Suite using the application in the examples/autobahn
subdirectory.Top issues
#203Increase in memory usage when compression is on44 comments · 2017-01-11#828[question] concurrent write to websocket connection with mutex.Lock()19 comments · 2022-11-18#859[BUG] websocket on compress close duplicate16 comments · 2023-10-30#481Support evented read14 comments · 2019-02-15#866Websocket ping pong timeout8 comments · 2023-11-14#674[bug] Cannot Add Sec-Websocket-Extensions header field as a client12 comments · 2021-03-17#417Websockets over HTTP/211 comments · 2018-08-26#474Add softer ReadMessage timeout mechanism that only cancels the operation and doesn't corrupt the entire connection10 comments · 2019-01-27
Discussions
#1003Is the package actively maintained or should we seek alternatives?0 comments · 2025-10-06#987Gorilla Websocket Package with Go 1.24 FIPS 140-30 comments · 2025-05-20#974Pattern for connecting one to one between two http routes?0 comments · 2025-01-21#968Seeking guide on ws 10k implementation1 comments · 2024-12-03#963Cannot send a message larger than 4096 bytes2 comments · 2024-10-07#961SetReadDeadline - Chat example (remove idle clients)5 comments · 2024-09-21#954Welcome to websocket Discussions!0 comments · 2024-08-30#955websocket: bad handshake 403 Forbidden3 comments · 2024-08-13
Latest release
v1.5.3 v1.5.3 2024-06-14Important change This reverts the websockets package back to https://github.com/gorilla/websocket/commit/931041c5ee6de24fe9cba1aa16f1a0b910284d6d What's Changed Fixes subprotocol selection (aling with rfc6455) by @KSDaemon in https://github.com/gorilla/websocket/pull/823 Update README.md, replace master to main by @mstmdev in https://github.com/gorilla/websocket/pull/862 Use status code constant by @mstmdev in https://github.com/gorilla/websocket/pull/864 conn.go: default close handler should not return ErrCloseSent. by @pnx in https://github.com/gorilla/websocket/pull/865 fix: