websocket
所属分类:Websocket编程
开发工具:GO
文件大小:0KB
下载次数:0
上传日期:2016-08-11 09:19:14
上 传 者:
sh-1993
说明: Go(Go编程语言)fasthttp的WebSocket包。
(WebSocket package for Go(go programing language) fasthttp.)
文件列表:
.travis.yml (262, 2016-08-11)
AUTHORS (190, 2016-08-11)
LICENSE (1312, 2016-08-11)
client.go (10616, 2016-08-11)
compression.go (1781, 2016-08-11)
conn.go (26102, 2016-08-11)
conn_read.go (380, 2016-08-11)
conn_read_legacy.go (440, 2016-08-11)
doc.go (5772, 2016-08-11)
examples/ (0, 2016-08-11)
examples/chat/ (0, 2016-08-11)
examples/chat/client.go (3468, 2016-08-11)
examples/chat/home.html (3908, 2016-08-11)
examples/chat/hub.go (1148, 2016-08-11)
examples/chat/main.go (1102, 2016-08-11)
json.go (1373, 2016-08-11)
server.go (7615, 2016-08-11)
util.go (4788, 2016-08-11)
# Gorilla WebSocket
Gorilla WebSocket is a [Go](http://golang.org/) implementation of the
[WebSocket](http://www.rfc-editor.org/rfc/rfc6455.txt) protocol.
*This fork adds support for the Go HTTP package
[fasthttp](https://github.com/valyala/fasthttp), which is a high performance,
byte slice oriented alternative to `net/http`.*
### Note that
The original repo is [Gorilla WebSocket](https://github.com/gorilla/websocket), and this project is fork from [leavengood/websocket](https://github.com/leavengood/websocket).
I am not the author, I just removed the supported for `net/http`, improved the **Upgrader** and provided some examples for fasthttp.
### Documentation
* [Chat example](examples/chat)
### Status
The Gorilla WebSocket package provides a complete and tested implementation of
the [WebSocket](http://www.rfc-editor.org/rfc/rfc6455.txt) protocol. The
package API is stable.
### Installation
go get github.com/clevergo/websocket
### Protocol Compliance
The Gorilla WebSocket package passes the server tests in the [Autobahn Test
Suite](http://autobahn.ws/testsuite) using the application in the [examples/autobahn
subdirectory](https://github.com/gorilla/websocket/tree/master/examples/autobahn).
### Gorilla WebSocket compared with other packages
Notes:
1. Large messages are fragmented in [Chrome's new WebSocket implementation](http://www.ietf.org/mail-archive/web/hybi/current/msg10503.html).
2. The application can get the type of a received data message by implementing
a [Codec marshal](http://godoc.org/golang.org/x/net/websocket#Codec.Marshal)
function.
3. 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.
近期下载者:
相关文件:
收藏者: