Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Upgrader = websocket.Upgrader{ ReadBufferSize: 10240, WriteBufferSize: 10240, CheckOrigin: func(r *http.Request) bool { return true }, }
Upgrader 升级 HTTP 连接为 WebSocket 连接
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
WriteWait time.Duration
PingPeriod time.Duration
PongWait time.Duration
MaxMessageSize int64
}
Config 配置
type Transport ¶
type Transport struct {
// contains filtered or unexported fields
}
Transport WebSocket 传输
func (*Transport) WriteMessage ¶
WriteMessage 写入消息
Click to show internal directories.
Click to hide internal directories.