Documentation ¶
Overview ¶
*
- ______ __
- /\__ _\ /\ \
- \/_/\ \/ ___ __\ \ \ __ ___ ___ __
- \ \ \ / ___\ / __ \ \ \ __ / __ \ / _ \ / ___\ / __ \
- \_\ \__/\ \__//\ __/\ \ \_\ \/\ \_\ \_/\ \/\ \/\ \__//\ __/
- /\_____\ \____\ \____\\ \____/\ \__/ \_\ \_\ \_\ \____\ \____\
- \/_____/\/____/\/____/ \/___/ \/__/\/_/\/_/\/_/\/____/\/____/ * *
- @寒冰
- www.icezzz.cn
- hanbin020706@163.com
*
- ______ __
- /\__ _\ /\ \
- \/_/\ \/ ___ __\ \ \ __ ___ ___ __
- \ \ \ / ___\ / __ \ \ \ __ / __ \ / _ \ / ___\ / __ \
- \_\ \__/\ \__//\ __/\ \ \_\ \/\ \_\ \_/\ \/\ \/\ \__//\ __/
- /\_____\ \____\ \____\\ \____/\ \__/ \_\ \_\ \_\ \____\ \____\
- \/_____/\/____/\/____/ \/___/ \/__/\/_/\/_/\/_/\/____/\/____/ * *
- @寒冰
- www.icezzz.cn
- hanbin020706@163.com
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func (*Connection) Receive ¶
func (u *Connection) Receive() error
Receive reads next message from user's underlying connection. It blocks until full message received.
type Group ¶
type Group struct { Hanlder *Handler // contains filtered or unexported fields }
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func (*Handler) AddHandler ¶
func (h *Handler) AddHandler(messageType uint16, fun RecvHandler)
func (*Handler) Execute ¶
func (h *Handler) Execute(data *MessageData) *MessageData
type MessageData ¶
type RecvHandler ¶
type RecvHandler func(message *MessageData) *MessageData
type WebSocketServer ¶
func New ¶
func New() *WebSocketServer
func (*WebSocketServer) AddHandler ¶
func (webserv *WebSocketServer) AddHandler(messageType uint16, fun RecvHandler)
func (*WebSocketServer) Start ¶
func (webserv *WebSocketServer) Start()
func (*WebSocketServer) Stop ¶
func (webserv *WebSocketServer) Stop()
Click to show internal directories.
Click to hide internal directories.