Versions in this module Expand all Collapse all v1 v1.0.3 Nov 20, 2024 v1.0.2 Nov 20, 2024 v1.0.1 Nov 19, 2024 Changes in this version + type WSCfg struct + ListenAddr string + LittleEndian bool + MaxConnNum int + MaxMsgLen uint32 + PendingWriteNum int + type WSClient struct + func (wc *WSClient) GetId() string + func (wc *WSClient) OnClose() + func (wc *WSClient) Run() + type WSModule struct + func (ws *WSModule) Close(clientId string) + func (ws *WSModule) GetClientIp(clientId string) string + func (ws *WSModule) GetProcessor() processor.IRawProcessor + func (ws *WSModule) Init(wsCfg *WSCfg, process processor.IRawProcessor) + func (ws *WSModule) NewWSClient(conn *network.WSConn) network.Agent + func (ws *WSModule) OnInit() error + func (ws *WSModule) SendMsg(clientId string, msg interface{}) error + func (ws *WSModule) SendRawMsg(clientId string, msg []byte) error + func (ws *WSModule) Start() error + type WSPack struct + ClientId string + Data any + MsgProcessor processor.IRawProcessor + Type WSPackType + type WSPackType int8 + const WPTConnected + const WPTDisConnected + const WPTPack + const WPTUnknownPack