Versions in this module Expand all Collapse all v2 v2.1.0 Dec 11, 2025 Changes in this version + type WSCfg struct + CertFile string + HandshakeTimeoutSecond time.Duration + KeyFile string + ListenAddr string + LittleEndian bool + MaxConnNum int + MaxMsgLen uint32 + PendingWriteNum int + ReadTimeoutSecond time.Duration + WriteTimeoutSecond time.Duration + type WSClient struct + func (wc *WSClient) GetId() string + func (wc *WSClient) OnClose() + func (wc *WSClient) Run() + type WSModule struct + WSServer network.WSServer + func (ws *WSModule) Close(clientId string) + func (ws *WSModule) GetClientHeader(clientId string, key string) 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) SetMessageType(messageType int) + 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