Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Bots = make(map[string]*Bot)
Functions ¶
func UpgradeWebsocket ¶
func UpgradeWebsocket(w http.ResponseWriter, r *http.Request) error
Types ¶
type Bot ¶
type Bot struct {
RemoteAddr string
Session *SafeWebSocket
WaitingFrames map[string]*promise.Promise
// contains filtered or unexported fields
}
type SafeWebSocket ¶
type SafeWebSocket struct {
Conn *websocket.Conn
SendChannel chan *WebSocketSendingMessage
OnRecvMessage func(messageType int, data []byte)
OnClose func(int, string)
}
safe websocket
func NewSafeWebSocket ¶
func (*SafeWebSocket) Send ¶
func (ws *SafeWebSocket) Send(messageType int, data []byte)
type WebSocketSendingMessage ¶
Click to show internal directories.
Click to hide internal directories.