mirror of https://github.com/gorilla/websocket.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
5 years ago | |
|---|---|---|
| .circleci | 5 years ago | |
| .github | 6 years ago | |
| examples | 5 years ago | |
| .gitignore | 8 years ago | |
| AUTHORS | 8 years ago | |
| LICENSE | 12 years ago | |
| README.md | 6 years ago | |
| client.go | 5 years ago | |
| client_clone.go | 9 years ago | |
| client_clone_legacy.go | 9 years ago | |
| client_server_test.go | 5 years ago | |
| client_test.go | 8 years ago | |
| compression.go | 9 years ago | |
| compression_test.go | 7 years ago | |
| conn.go | 6 years ago | |
| conn_broadcast_test.go | 7 years ago | |
| conn_test.go | 6 years ago | |
| conn_write.go | 8 years ago | |
| conn_write_legacy.go | 8 years ago | |
| doc.go | 6 years ago | |
| example_test.go | 6 years ago | |
| go.mod | 6 years ago | |
| go.sum | 6 years ago | |
| join.go | 7 years ago | |
| join_test.go | 7 years ago | |
| json.go | 8 years ago | |
| json_test.go | 7 years ago | |
| mask.go | 8 years ago | |
| mask_safe.go | 9 years ago | |
| mask_test.go | 7 years ago | |
| prepared.go | 6 years ago | |
| prepared_test.go | 7 years ago | |
| proxy.go | 7 years ago | |
| server.go | 5 years ago | |
| server_test.go | 7 years ago | |
| trace.go | 7 years ago | |
| trace_17.go | 7 years ago | |
| util.go | 7 years ago | |
| util_test.go | 7 years ago | |
| x_net_proxy.go | 8 years ago | |
README.md
Gorilla WebSocket
Gorilla WebSocket is a Go implementation of the WebSocket protocol.
Documentation
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.
Gorilla WebSocket compared with other packages
| 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 |
Notes:
- Large messages are fragmented in Chrome's new WebSocket implementation.
- The application can get the type of a received data message by implementing a Codec marshal function.
- The go.net 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.