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.
hellflame
e8629af678
|
3 years ago | |
---|---|---|
.circleci | 4 years ago | |
.github | 5 years ago | |
examples | 3 years ago | |
.gitignore | 7 years ago | |
AUTHORS | 6 years ago | |
LICENSE | 11 years ago | |
README.md | 5 years ago | |
client.go | 4 years ago | |
client_clone.go | 8 years ago | |
client_clone_legacy.go | 8 years ago | |
client_server_test.go | 4 years ago | |
client_test.go | 7 years ago | |
compression.go | 8 years ago | |
compression_test.go | 6 years ago | |
conn.go | 5 years ago | |
conn_broadcast_test.go | 6 years ago | |
conn_test.go | 5 years ago | |
conn_write.go | 7 years ago | |
conn_write_legacy.go | 7 years ago | |
doc.go | 5 years ago | |
example_test.go | 5 years ago | |
go.mod | 5 years ago | |
go.sum | 5 years ago | |
join.go | 6 years ago | |
join_test.go | 6 years ago | |
json.go | 7 years ago | |
json_test.go | 6 years ago | |
mask.go | 7 years ago | |
mask_safe.go | 8 years ago | |
mask_test.go | 6 years ago | |
prepared.go | 5 years ago | |
prepared_test.go | 6 years ago | |
proxy.go | 6 years ago | |
server.go | 4 years ago | |
server_test.go | 6 years ago | |
trace.go | 6 years ago | |
trace_17.go | 6 years ago | |
util.go | 6 years ago | |
util_test.go | 6 years ago | |
x_net_proxy.go | 7 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.