Versions in this module Expand all Collapse all v1 v1.0.3 Apr 22, 2022 Changes in this version + type BaseSession struct + func GetBaseSession(h *core.TcpHandle) *BaseSession + func (b *BaseSession) GetSid() uint64 + func (b *BaseSession) HandleRoute(r *router.Router, m *deal.Msg) error + func (b *BaseSession) Notice(route string, input interface{}) error + func (b *BaseSession) Push(route string, input interface{}) error + func (b *BaseSession) PushTo(sid uint64, route string, input interface{}) error + func (b *BaseSession) Response(route string, input interface{}) error + func (b *BaseSession) Rpc(route string, input, output interface{}) error + func (b *BaseSession) RpcResponse(route string, input interface{}) error + func (b *BaseSession) SendTo(addr string, msg *deal.Msg) error + func (b *BaseSession) SetSid(sid uint64) + type MasterSession struct + func GetMasterSession(h *core.TcpHandle) *MasterSession + func (s *MasterSession) HandleRoute(r *router.Router, m *deal.Msg) error + type Member struct + SID uint64 + Sessions map[uint64]*MemberSession + func GetMember() *Member + func (m *Member) SessionClose(s *MemberSession) + func (m *Member) SessionCount() int + func (m *Member) SessionFindByID(sid uint64) *MemberSession + func (m *Member) SesssionInit(s *MemberSession) error + type MemberSession struct + func GetMemberSession(h *core.TcpHandle) *MemberSession + func (s *MemberSession) HandleRoute(r *router.Router, m *deal.Msg) error + func (s *MemberSession) Notice(route string, input interface{}) error + func (s *MemberSession) RpcRequest(ss *BaseSession, msg *deal.Msg) error + type ServerSession struct + func GetServerSession(h *core.TcpHandle) *ServerSession + func (s *ServerSession) HandleRoute(r *router.Router, m *deal.Msg) error + func (s *ServerSession) Notice(route string, input interface{}) error + func (s *ServerSession) Push(route string, input interface{}) error + func (s *ServerSession) PushTo(sid uint64, route string, input interface{}) error + func (s *ServerSession) Response(route string, input interface{}) error + func (s *ServerSession) Rpc(route string, input, output interface{}) error + func (s *ServerSession) RpcResponse(route string, input interface{}) error + type Session interface + Del func(k string) + Get func(k string) interface{} + GetAddr func() string + GetBool func(k string) bool + GetFloat func(k string) float64 + GetInt func(k string) int + GetInt32 func(k string) int32 + GetInt64 func(k string) int64 + GetMid func() uint64 + GetSid func() uint64 + GetString func(k string) string + GetUInt func(k string) uint + GetUInt32 func(k string) uint32 + GetUInt64 func(k string) uint64 + HandleRoute func(r *router.Router, m *deal.Msg) error + Notice func(route string, input interface{}) error + Push func(route string, input interface{}) error + PushTo func(sid uint64, route string, input interface{}) error + Response func(route string, input interface{}) error + Rpc func(route string, input, output interface{}) error + RpcResponse func(route string, input interface{}) error + SendTo func(addr string, msg *deal.Msg) error + Set func(k string, v interface{}) + SetSid func(sid uint64) v1.0.1 Apr 22, 2022