Versions in this module Expand all Collapse all v0 v0.0.2 Jan 24, 2025 v0.0.1 Jan 22, 2025 Changes in this version + type Kind int + const Conn + const User + func (k Kind) String() string + type Session struct + func NewSession() *Session + func (s *Session) AddConn(conn gnetwork.Conn) + func (s *Session) Bind(cid, uid int64) error + func (s *Session) Broadcast(kind Kind, msg []byte) (n int64, err error) + func (s *Session) Close(kind Kind, target int64, force ...bool) error + func (s *Session) Has(kind Kind, target int64) (ok bool, err error) + func (s *Session) LocalAddr(kind Kind, target int64) (net.Addr, error) + func (s *Session) LocalIP(kind Kind, target int64) (string, error) + func (s *Session) Multicast(kind Kind, targets []int64, msg []byte) (n int64, err error) + func (s *Session) Push(kind Kind, target int64, msg []byte) error + func (s *Session) RemConn(conn gnetwork.Conn) + func (s *Session) RemoteAddr(kind Kind, target int64) (net.Addr, error) + func (s *Session) RemoteIP(kind Kind, target int64) (string, error) + func (s *Session) Send(kind Kind, target int64, msg []byte) error + func (s *Session) Stat(kind Kind) (int64, error) + func (s *Session) Unbind(uid int64) (int64, error)