Versions in this module Expand all Collapse all v1 v1.9.1 Apr 8, 2026 v1.9.0 Apr 7, 2026 Changes in this version + const TypeHeartbeat + const TypeSys + func ProcessMsg(cli *Client, message []byte) + type Callback func(client *Client, message []byte) + type Client struct + AccessTime int64 + Addr string + IsActive bool + OnDisconnect func(*Client) + Send chan []byte + Socket *websocket.Conn + User string + func NewClient(addr string, user string, socket *websocket.Conn) (client *Client) + func (c *Client) Read(processData Callback) + func (c *Client) SendMsg(msg []byte) + func (c *Client) Write() + type ConnManagerIface interface + BroadcastSession func(sessionID string, msg []byte) + DestroyTask func() + Heartbeat func(cli *Client) + Register func(cli *Client) + Unregister func(cli *Client) + func NewWsConnManage() ConnManagerIface + type RecvMsg struct + Data interface{} + Type string + type SendMsg struct + Msg string + MsgFrom string + Status int8 + func (s *SendMsg) DoSend(cli *Client) + type Server struct + ConnManager ConnManagerIface + Heartbeat chan *Client + Register chan *Client + Unregister chan *Client + var WsServer *Server + func NewServer(connManage ConnManagerIface) (clientManager *Server) + func (c *Server) Start() + type WsConnManage struct + func (w *WsConnManage) BroadcastSession(sessionID string, msg []byte) + func (w *WsConnManage) ClientsOfSession(sessionID string) []*Client + func (w *WsConnManage) DestroyTask() + func (w *WsConnManage) Heartbeat(cli *Client) + func (w *WsConnManage) Register(cli *Client) + func (w *WsConnManage) Unregister(cli *Client)