Documentation
¶
Index ¶
- type Processor
- type Registry
- type Session
- func (s *Session) Animation() animation.Animation
- func (s *Session) Client() *minecraft.Conn
- func (s *Session) Close()
- func (s *Session) Disconnect(message string)
- func (s *Session) Latency() int64
- func (s *Session) Processor() Processor
- 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 {
// ProcessServer determines whether the provided packet, originating from the server, should be forwarded to the client.
// It returns true if the packet should be forwarded, otherwise false.
ProcessServer(packet packet.Packet) bool
// ProcessClient determines whether the provided packet, originating from the client, should be forwarded to the server.
// It returns true if the packet should be forwarded, otherwise false.
ProcessClient(packet packet.Packet) bool
}
Processor is an interface defining methods for handling incoming and outgoing packets within 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.