Clone this repo:
  1. 5ed622c Update LICENSE file to reflect Google employee contributions. by Matt Silverlock · 2 weeks ago master
  2. c17c80c Merge pull request #385 from dottyjones/master by Kamil Kisiel · 4 weeks ago
  3. badcf87 Improve names in handshake deadline test by dottyjones · 4 weeks ago
  4. f90b62c Add test for handshake deadline by dottyjones · 4 weeks ago
  5. 21ab95f Modify headers to match case used in RFC examples by Gary Burd · 9 weeks ago

Gorilla WebSocket

Gorilla WebSocket is a Go implementation of the WebSocket protocol.

Build Status GoDoc



The Gorilla WebSocket package provides a complete and tested implementation of the WebSocket protocol. The package API is stable.


go get

Protocol Compliance

The Gorilla WebSocket package passes the server tests in the Autobahn Test Suite using the application in the examples/autobahn subdirectory.

Gorilla WebSocket compared with other packages


  1. Large messages are fragmented in Chrome's new WebSocket implementation.
  2. The application can get the type of a received data message by implementing a Codec marshal function.
  3. The io.Reader and io.Writer operate across WebSocket frame boundaries. Read returns when the input buffer is full or a frame boundary is encountered. Each call to Write sends a single frame message. The Gorilla io.Reader and io.WriteCloser operate on a single WebSocket message.