Documentation ¶
Index ¶
- func NewSessionManager(engine core.Engine) core.SessionManager
- type Session
- func (s *Session) Expiry() time.Time
- func (s *Session) HandlePacket(pkt *packet.RTDEXPacket)
- func (s *Session) ID() uint32
- func (s *Session) Namespace() string
- func (s *Session) RemoteAddr() string
- func (s *Session) ResetExpiry()
- func (s *Session) SlotIncrement(slot int)
- func (s *Session) Start()
- func (s *Session) Stop()
- func (s *Session) UpdateRemoteAddr(remoteAddr *net.UDPAddr)
- type SessionManager
- func (m *SessionManager) CreateSession(id uint32, namespace string, remoteAddr *net.UDPAddr) core.Session
- func (m *SessionManager) GetAllSessions() []core.Session
- func (m *SessionManager) GetSession(id uint32) core.Session
- func (m *SessionManager) Housekeeping()
- func (m *SessionManager) RemoveAllSessions()
- func (m *SessionManager) RemoveSession(id uint32)
- func (m *SessionManager) Start()
- func (m *SessionManager) WatchSlotSignal()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSessionManager ¶
func NewSessionManager(engine core.Engine) core.SessionManager
Types ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func NewSession ¶
func (*Session) HandlePacket ¶
func (s *Session) HandlePacket(pkt *packet.RTDEXPacket)
func (*Session) RemoteAddr ¶
func (*Session) ResetExpiry ¶
func (s *Session) ResetExpiry()
func (*Session) SlotIncrement ¶
func (*Session) UpdateRemoteAddr ¶
type SessionManager ¶
func (*SessionManager) CreateSession ¶
func (*SessionManager) GetAllSessions ¶
func (m *SessionManager) GetAllSessions() []core.Session
func (*SessionManager) GetSession ¶
func (m *SessionManager) GetSession(id uint32) core.Session
func (*SessionManager) Housekeeping ¶
func (m *SessionManager) Housekeeping()
func (*SessionManager) RemoveAllSessions ¶
func (m *SessionManager) RemoveAllSessions()
func (*SessionManager) RemoveSession ¶
func (m *SessionManager) RemoveSession(id uint32)
func (*SessionManager) Start ¶
func (m *SessionManager) Start()
func (*SessionManager) WatchSlotSignal ¶
func (m *SessionManager) WatchSlotSignal()
Click to show internal directories.
Click to hide internal directories.