gorilla/websocket
GitHub: gorilla/websocket
一个完整实现 WebSocket 协议且经过充分测试的 Go 语言库。
Stars: 24664 | Forks: 3577
# Gorilla WebSocket
[](https://godoc.org/github.com/gorilla/websocket)
[](https://circleci.com/gh/gorilla/websocket)
Gorilla WebSocket 是 [WebSocket](http://www.rfc-editor.org/rfc/rfc6455.txt) 协议的 [Go](http://golang.org/) 实现。
### 文档
* [API 参考](https://pkg.go.dev/github.com/gorilla/websocket?tab=doc)
* [聊天示例](https://github.com/gorilla/websocket/tree/main/examples/chat)
* [命令示例](https://github.com/gorilla/websocket/tree/main/examples/command)
* [客户端和服务器示例](https://github.com/gorilla/websocket/tree/main/examples/echo)
* [文件监控示例](https://github.com/gorilla/websocket/tree/main/examples/filewatch)
### 状态
Gorilla WebSocket 包提供了 [WebSocket](http://www.rfc-editor.org/rfc/rfc6455.txt) 协议的完整且经过测试的实现。该包的 API 稳定。
### 安装
```
go get github.com/gorilla/websocket
```
### 协议合规性
Gorilla WebSocket 包使用 [examples/autobahn 子目录](https://github.com/gorilla/websocket/tree/main/examples/autobahn) 中的应用程序,通过了 [Autobahn 测试套件](https://github.com/crossbario/autobahn-testsuite) 中的服务器测试。
标签:Go, Golang, Gorilla, IP 地址批量处理, RFC6455, Ruby工具, Syscall, WebSocket, Web开发, 依赖分析, 全双工通信, 内核驱动, 协议实现, 后端开发, 安全编程, 实时通信, 开源库, 搜索引擎爬虫, 日志审计, 第三方库, 网络协议, 网络编程, 通信框架