Documentation
¶
Index ¶
Constants ¶
View Source
const ( STATUS_CLOSE_NORMAL_CLOSURE = 1000 STATUS_CLOSE_GOING_AWAY = 1001 STATUS_CLOSE_PROTOCOL_ERR = 1002 STATUS_CLOSE_UNSUPPORTED = 1003 STATUS_CLOSE_NO_STATUS = 1005 STATUS_CLOSE_ABNORMAL_CLOSURE = 1006 STATUS_CLOSE_INVALID_PAYLOAD = 1007 STATUS_CLOSE_POLICY_VIOLATION = 1008 STATUS_CLOSE_MESSAGE_TOO_BIG = 1009 STATUS_CLOSE_MANDATORY_EXTENSION = 1010 STATUS_CLOSE_INTERNAL_SERVER_ERROR = 1011 STATUS_CLOSE_SERVICE_RESTART = 1012 STATUS_CLOSE_TRY_AGAIN_LATER = 1013 STATUS_CLOSE_TLS_HANDSHAKE = 1015 )
status codes for websocket close frames
View Source
const MAGIC_KEY = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a WebSocket client connection.
type Frame ¶
type Frame struct {
FIN bool
RSV1 bool
RSV2 bool
RSV3 bool
OpCode Opcode
IsMasked bool
MaskingKey [4]byte
PayloadLength uint64
Payload []byte
}
Frame represents a WebSocket frame.
func DecodeFrame ¶
DecodeFrame decodes a WebSocket frame from the given byte slice.
Click to show internal directories.
Click to hide internal directories.