Documentation
¶
Index ¶
- type Processor
- type Registry
- type Session
- func (s *Session) Animation() animation.Animation
- func (s *Session) Close()
- func (s *Session) Disconnect(message string)
- func (s *Session) Latency() int64
- func (s *Session) Server() *server.Conn
- func (s *Session) SetAnimation(animation animation.Animation)
- func (s *Session) SetProcessor(processor Processor)
- func (s *Session) Transfer(addr string) error
- type Tracker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Processor ¶
type Processor interface {
// ProcessIncoming determines whether the provided packet, incoming from the server, should be received by the client.
// It returns true if the packet should be received, otherwise false.
ProcessIncoming(packet packet.Packet) bool
// ProcessOutgoing determines whether the provided packet, outgoing from the client, should be sent to the server.
// It returns true if the packet should be sent, otherwise false.
ProcessOutgoing(packet packet.Packet) bool
}
Processor is an interface that defines methods for processing incoming and outgoing packets in a session.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
func NewRegistry() *Registry
func (*Registry) AddSession ¶
func (*Registry) GetSession ¶
func (*Registry) GetSessionByUsername ¶
func (*Registry) GetSessions ¶
func (*Registry) RemoveSession ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func NewSession ¶
func (*Session) Disconnect ¶
func (*Session) SetAnimation ¶
func (*Session) SetProcessor ¶
type Tracker ¶
type Tracker struct {
// contains filtered or unexported fields
}
func NewTracker ¶
func NewTracker() *Tracker
Click to show internal directories.
Click to hide internal directories.