Documentation ¶
Index ¶
Constants ¶
View Source
const ( OpText = 1 OpBinary = 2 OpClose = 8 OpPing = 9 OpPong = 10 )
WebSocket frame opcodes
View Source
const ( CloseStatusNoStatusReceived uint16 = 1005 CloseStatusProtocolError uint16 = 1002 )
WebSocket connection close status codes. https://www.rfc-editor.org/rfc/rfc6455#section-11.7
Variables ¶
View Source
var ( ErrProtocolError = errors.New("protocol error") ErrConnectionClosed = errors.New("connection has been closed") )
View Source
var (
ErrUpgradeFailed = errors.New("failed to upgrade to the WebSocket protocol")
)
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn represents a WebSocket connection.
func (*Conn) ReadMessage ¶
ReadMessage returns payload from inoming WebSocket frame.
Click to show internal directories.
Click to hide internal directories.