Versions in this module Expand all Collapse all v1 v1.0.1 Oct 14, 2022 Changes in this version + const CmdNameLogin + func DoCmdAction(c *Client, cmd WSCmd) + func InitWS() + func InitWSX(addr string, c chan struct{}) + func LoginCMDHandler(c *Client, cmd WSCmd) + func LoginCmdAction(c *Client, input LoginCmdInput) + func RegisterCmdHandler(cmd string, handler WSCmdHandler) + type Client struct + Hub *Hub + ID string + func (c *Client) GetIP() string + func (c *Client) SendFailureMsg(msg string, v ...interface{}) + func (c *Client) SendFailureMsgWithErr(err error) + func (c *Client) SendSuccessMsg(msg interface{}) + type Hub struct + type LoginCmdInput struct + Name string + Passwd string + type WSCmd struct + Category string + Cmd string + Data interface{} + Target string + func ParseCmd(bytes []byte) (WSCmd, error) + type WSCmdHandler func(c *Client, cmd WSCmd)