Versions in this module Expand all Collapse all v0 v0.5.0 Apr 6, 2023 Changes in this version + var ErrIllegalUID = errors.New("illegal uid") + var Lifetime = &lifetime + type LifetimeHandler func(*Session) + type NetworkEntity interface + Close func() error + LastMid func() uint64 + Push func(route string, v interface{}) error + RPC func(route string, v interface{}) error + RemoteAddr func() net.Addr + Response func(v interface{}) error + ResponseMid func(mid uint64, v interface{}) error + type Router struct + func (r *Router) Bind(service, address string) + func (r *Router) Find(service string) (string, bool) + type Session struct + func New(entity NetworkEntity) *Session + func (s *Session) Bind(uid int64) error + func (s *Session) Clear() + func (s *Session) Close() + func (s *Session) Float32(key string) float32 + func (s *Session) Float64(key string) float64 + func (s *Session) HasKey(key string) bool + func (s *Session) ID() int64 + func (s *Session) Int(key string) int + func (s *Session) Int16(key string) int16 + func (s *Session) Int32(key string) int32 + func (s *Session) Int64(key string) int64 + func (s *Session) Int8(key string) int8 + func (s *Session) LastMid() uint64 + func (s *Session) NetworkEntity() NetworkEntity + func (s *Session) Push(route string, v interface{}) error + func (s *Session) RPC(route string, v interface{}) error + func (s *Session) RemoteAddr() net.Addr + func (s *Session) Remove(key string) + func (s *Session) Response(v interface{}) error + func (s *Session) ResponseMID(mid uint64, v interface{}) error + func (s *Session) Restore(data map[string]interface{}) + func (s *Session) Router() *Router + func (s *Session) Set(key string, value interface{}) + func (s *Session) State() map[string]interface{} + func (s *Session) String(key string) string + func (s *Session) UID() int64 + func (s *Session) Uint(key string) uint + func (s *Session) Uint16(key string) uint16 + func (s *Session) Uint32(key string) uint32 + func (s *Session) Uint64(key string) uint64 + func (s *Session) Uint8(key string) uint8 + func (s *Session) Value(key string) interface{}