Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultReadTimeout = time.Minute
View Source
const DefaultWriteTimeout = time.Minute
View Source
const MsgTypeBinary = websocket.BinaryMessage
MsgTypeBinary binary message type
View Source
const MsgTypeText = websocket.TextMessage
MsgTypeText text message type
Variables ¶
View Source
var ErrMsgTypeNotMatch = errors.New("websocket message type not match")
ErrMsgTypeNotMatch error message type not match
View Source
var Upgrader = websocket.Upgrader{}
Upgrader websocket connection upgrader config
Functions ¶
This section is empty.
Types ¶
type Conn ¶
Conn websocket connection
func Upgrade ¶
Upgrade Upgrade http requret with given message type to websocket concection. Return websocker connection and any error if raised.
func (*Conn) MessagesChan ¶
MessagesChan connection message chan
func (*Conn) RemoteAddr ¶
RemoteAddr return connection rempte address.
Click to show internal directories.
Click to hide internal directories.