Gorilla WebSocket is a Go implementation of the WebSocket protocol.
The Gorilla WebSocket package provides a complete and tested implementation of the WebSocket protocol. The package API is stable.
go get github.com/gorilla/websocket
The Gorilla WebSocket package passes the server tests in the Autobahn Test Suite using the application in the examples/autobahn subdirectory.
| github.com/gorilla | golang.org/x/net | |
|---|---|---|
| RFC 6455 Features | ||
| Passes Autobahn Test Suite | Yes | No |
| Receive fragmented message | Yes | No, see note 1 |
| Send close message | Yes | No |
| Send pings and receive pongs | Yes | No |
| Get the type of a received data message | Yes | Yes, see note 2 |
| Other Features | ||
| Compression Extensions | Experimental | No |
| Read message using io.Reader | Yes | No, see note 3 |
| Write message using io.WriteCloser | Yes | No, see note 3 |