Documentation ¶
Index ¶
- Variables
- type Config
- type Context
- type EventBus
- type EventCancellable
- type EventSession
- type EventSessionClose
- type EventSessionHandler
- type EventSessionLogin
- type EventSessionOpen
- type EventSessionPacket
- type EventSessionRedirect
- type EventSessionState
- type OutBridge
- type PacketDirection
- type PacketStage
- type PacketSubject
- type Plugin
- type Session
- type SessionRegistry
- type SessionState
Constants ¶
This section is empty.
Variables ¶
View Source
var SessionStateAll []SessionState = []SessionState{ SessionStateDisconnected, SessionStateStatus, SessionStateStatusPing, SessionStateLogin, SessionStateLoginEncrypt, SessionStateInit, SessionStateConnected, }
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context interface { Config() Config EventBus() EventBus SessionRegistry() SessionRegistry }
type EventBus ¶
type EventBus interface { HandleSessionOpen(EventSessionHandler) HandleSessionLogin(EventSessionHandler) HandleSessionClose(EventSessionHandler) HandleSessionState(EventSessionHandler) HandleSessionRedirect(EventSessionHandler) HandleSessionPacket(EventSessionHandler, PacketStage, PacketSubject, PacketDirection, ...SessionState) }
type EventCancellable ¶
type EventSession ¶
type EventSession interface {
Session() Session
}
type EventSessionClose ¶
type EventSessionClose interface { EventSession }
type EventSessionHandler ¶
type EventSessionHandler func(EventSession)
type EventSessionLogin ¶
type EventSessionLogin interface { EventSession EventCancellable SetReason(reason string) GetReason() string }
type EventSessionOpen ¶
type EventSessionOpen interface { EventSession EventCancellable }
type EventSessionPacket ¶
type EventSessionPacket interface { EventSession EventCancellable Packet() packet.Packet PacketSubject() PacketSubject PacketDirection() PacketDirection SetPacket(packet.Packet) }
type EventSessionRedirect ¶
type EventSessionRedirect interface { EventSession EventCancellable Init() bool ServerName() string ServerAddr() string }
type EventSessionState ¶
type EventSessionState interface { EventSession State() SessionState }
type PacketDirection ¶
type PacketDirection int
const ( PacketDirectionRead PacketDirection = iota PacketDirectionWrite PacketDirectionMax )
type PacketStage ¶
type PacketStage int
const ( PacketStagePre PacketStage = iota PacketStageMonitor PacketStageMax )
type PacketSubject ¶
type PacketSubject int
const ( PacketSubjectClient PacketSubject = iota PacketSubjectOutBridge PacketSubjectMax )
type Session ¶
type Session interface { Conn() net.Conn Write(packet.Packet, PacketSubject) Pipeline() *packet.PacketPipeline Profile() (name string, uuid uuid.UUID) Disconnect(reason string) DisconnectJson(json string) Remote() (ip string, port string) RemoteOverride(ip string, port string) State() SessionState Version() *minecraft.Version OutBridge() OutBridge }
type SessionRegistry ¶
type SessionState ¶
type SessionState int
const ( SessionStateDisconnected SessionState = iota SessionStateStatus SessionStateStatusPing SessionStateLogin SessionStateLoginEncrypt SessionStateInit SessionStateConnected SessionStateMax )
Click to show internal directories.
Click to hide internal directories.