Documentation
¶
Index ¶
Constants ¶
View Source
const ( /* * 文本帧类型 * 0 0 0 0 0 0 0 1 */ TextMessage = 1 /* * 关闭数据帧类型 * 0 0 0 0 1 0 0 0 */ CloseMessage = 8 )
Variables ¶
View Source
var KeyGUID = []byte("258EAFA5-E914-47DA-95CA-C5AB0DC85B11")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
NewCient new http client NewClient("http://10.0.2.15:8080/")
func (*Client) Upgrade ¶
Upgrade http 协议升级为websocket协议 GET /path HTTP/1.1 Host: server.example.com Upgrade: websocket Connection: Upgrade Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ== Origin: http://example.com Sec-WebSocket-Protcol: chat, superchat Sec-WebSocket-Version: 13
Click to show internal directories.
Click to hide internal directories.