Documentation ¶
Index ¶
- Constants
- Variables
- func NewPacketResultCodec(sequencer PacketResultSequencer) (this *packetResultCodec)
- type PacketKeepalive
- type PacketMessageEvent
- type PacketRedirectEvent
- type PacketRequest
- type PacketResult
- type PacketResultSequencer
- type PacketServerEvent
- type Request
- type RequestAsProxy
- type RequestAsServer
- type RequestAuthenticate
- type RequestCodec
- type RequestGetDetails
- type RequestGetPlayers
- type RequestGetSalt
- type RequestGetWhoami
- type RequestMessage
- type RequestNotifyPlayer
- type RequestRedirect
- type Result
- type ResultAsProxy
- type ResultAsServer
- type ResultAuthenticate
- type ResultCodec
- type ResultGetDetails
- type ResultGetPlayers
- type ResultGetSalt
- type ResultGetWhoami
- type ResultMessage
- type ResultNotifyPlayer
- type ResultRedirect
Constants ¶
View Source
const ( STATUS_ERROR_ROLE = 0x02 STATUS_ERROR_GENERIC = 0x01 STATUS_SUCCESS = 0x00 REQUEST_AUTHENTICATE = 0x00 REQUEST_AS_SERVER = 0x01 REQUEST_AS_PROXY = 0x02 REQUEST_GET_SALT = 0x03 REQUEST_GET_WHOAMI = 0x04 REQUEST_MESSAGE = 0x10 REQUEST_REDIRECT = 0x11 REQUEST_GET_PLAYERS = 0x20 REQUEST_NOTIFY_PLAYER = 0x21 REQUEST_GET_DETAILS = 0x22 PACKET_KEEPALIVE = 0x00 PACKET_REQUEST = 0x01 PACKET_RESULT = 0x02 PACKET_MESSAGE_EVENT = 0x03 PACKET_REDIRECT_EVENT = 0x04 PACKET_SERVER_EVENT = 0x05 )
Variables ¶
View Source
var PacketCodec = packet.NewPacketCodecRegistry([]packet.PacketCodec{ PACKET_KEEPALIVE: new(packetKeepaliveCodec), PACKET_REQUEST: new(packetRequestCodec), PACKET_RESULT: new(packetResultCodec), PACKET_MESSAGE_EVENT: new(packetMessageEventCodec), PACKET_REDIRECT_EVENT: new(packetRedirectEventCodec), PACKET_SERVER_EVENT: new(packetServerEventCodec), })
Functions ¶
func NewPacketResultCodec ¶
func NewPacketResultCodec(sequencer PacketResultSequencer) (this *packetResultCodec)
Types ¶
type PacketKeepalive ¶
type PacketKeepalive struct {
Random int32
}
func NewPacketKeepalive ¶
func NewPacketKeepalive(random int32) (this *PacketKeepalive)
func (*PacketKeepalive) Id ¶
func (this *PacketKeepalive) Id() int
type PacketMessageEvent ¶
func NewPacketMessageEvent ¶
func NewPacketMessageEvent(sender string, channel string, payload []byte) (this *PacketMessageEvent)
func (*PacketMessageEvent) Id ¶
func (this *PacketMessageEvent) Id() int
type PacketRedirectEvent ¶
func NewPacketRedirectEvent ¶
func NewPacketRedirectEvent(server string, player string) (this *PacketRedirectEvent)
func (*PacketRedirectEvent) Id ¶
func (this *PacketRedirectEvent) Id() int
type PacketRequest ¶
func NewPacketRequest ¶
func NewPacketRequest(sequenceId int32, request Request) (this *PacketRequest)
func (*PacketRequest) Id ¶
func (this *PacketRequest) Id() int
type PacketResult ¶
func NewPacketResult ¶
func NewPacketResult(sequenceId int32, statusCode uint8, result Result) (this *PacketResult)
func (*PacketResult) Id ¶
func (this *PacketResult) Id() int
type PacketResultSequencer ¶
type PacketServerEvent ¶
type PacketServerEvent struct { Add bool Server string SecurityKey string Address string Port uint16 }
func NewPacketServerEventAdd ¶
func NewPacketServerEventAdd(server string, securityKey string, address string, port uint16) (this *PacketServerEvent)
func NewPacketServerEventRemove ¶
func NewPacketServerEventRemove(server string) (this *PacketServerEvent)
func (*PacketServerEvent) Id ¶
func (this *PacketServerEvent) Id() int
type RequestAsProxy ¶
type RequestAsProxy struct { Address string Port uint16 Motd string Version string MaxPlayers uint16 }
func NewRequestAsProxy ¶
func (*RequestAsProxy) Id ¶
func (this *RequestAsProxy) Id() int
type RequestAsServer ¶
func NewRequestAsServer ¶
func NewRequestAsServer(address string, port uint16) (this *RequestAsServer)
func (*RequestAsServer) Id ¶
func (this *RequestAsServer) Id() int
type RequestAuthenticate ¶
func NewRequestAuthenticate ¶
func NewRequestAuthenticate(username string, password string) (this *RequestAuthenticate)
func (*RequestAuthenticate) Id ¶
func (this *RequestAuthenticate) Id() int
type RequestCodec ¶
type RequestGetDetails ¶
type RequestGetDetails struct { }
func NewRequestGetDetails ¶
func NewRequestGetDetails() (this *RequestGetDetails)
func (*RequestGetDetails) Id ¶
func (this *RequestGetDetails) Id() int
type RequestGetPlayers ¶
type RequestGetPlayers struct {
List bool
}
func NewRequestGetPlayers ¶
func NewRequestGetPlayers() (this *RequestGetPlayers)
func NewRequestGetPlayersList ¶
func NewRequestGetPlayersList() (this *RequestGetPlayers)
func (*RequestGetPlayers) Id ¶
func (this *RequestGetPlayers) Id() int
type RequestGetSalt ¶
type RequestGetSalt struct { }
func NewRequestGetSalt ¶
func NewRequestGetSalt() (this *RequestGetSalt)
func (*RequestGetSalt) Id ¶
func (this *RequestGetSalt) Id() int
type RequestGetWhoami ¶
type RequestGetWhoami struct { }
func NewRequestGetWhoami ¶
func NewRequestGetWhoami() (this *RequestGetWhoami)
func (*RequestGetWhoami) Id ¶
func (this *RequestGetWhoami) Id() int
type RequestMessage ¶
func NewRequestMessage ¶
func NewRequestMessage(recipients []string, channel string, message []byte) (this *RequestMessage)
func (*RequestMessage) Id ¶
func (this *RequestMessage) Id() int
type RequestNotifyPlayer ¶
func NewRequestNotifyPlayerAdd ¶
func NewRequestNotifyPlayerAdd(player string, uuid uuid.UUID) (this *RequestNotifyPlayer)
func NewRequestNotifyPlayerRemove ¶
func NewRequestNotifyPlayerRemove(player string, uuid uuid.UUID) (this *RequestNotifyPlayer)
func (*RequestNotifyPlayer) Id ¶
func (this *RequestNotifyPlayer) Id() int
type RequestRedirect ¶
func NewRequestRedirect ¶
func NewRequestRedirect(server string, player string) (this *RequestRedirect)
func (*RequestRedirect) Id ¶
func (this *RequestRedirect) Id() int
type ResultAsProxy ¶
type ResultAsProxy struct { }
func NewResultAsProxy ¶
func NewResultAsProxy() (this *ResultAsProxy)
func (*ResultAsProxy) Id ¶
func (this *ResultAsProxy) Id() int
type ResultAsServer ¶
type ResultAsServer struct {
SecurityKey string
}
func NewResultAsServer ¶
func NewResultAsServer(securityKey string) (this *ResultAsServer)
func (*ResultAsServer) Id ¶
func (this *ResultAsServer) Id() int
type ResultAuthenticate ¶
type ResultAuthenticate struct { }
func NewResultAuthenticate ¶
func NewResultAuthenticate() (this *ResultAuthenticate)
func (*ResultAuthenticate) Id ¶
func (this *ResultAuthenticate) Id() int
type ResultCodec ¶
type ResultGetDetails ¶
func NewResultGetDetails ¶
func NewResultGetDetails(ip string, port uint16, motd string, version string) (this *ResultGetDetails)
func (*ResultGetDetails) Id ¶
func (this *ResultGetDetails) Id() int
type ResultGetPlayers ¶
func NewResultGetPlayers ¶
func NewResultGetPlayers(currentPlayers uint16, maxPlayers uint16) (this *ResultGetPlayers)
func NewResultGetPlayersList ¶
func NewResultGetPlayersList(currentPlayers uint16, maxPlayers uint16, players []string) (this *ResultGetPlayers)
func (*ResultGetPlayers) Id ¶
func (this *ResultGetPlayers) Id() int
type ResultGetSalt ¶
type ResultGetSalt struct {
Salt string
}
func NewResultGetSalt ¶
func NewResultGetSalt(salt string) (this *ResultGetSalt)
func (*ResultGetSalt) Id ¶
func (this *ResultGetSalt) Id() int
type ResultGetWhoami ¶
type ResultGetWhoami struct {
Whoiam string
}
func NewResultGetWhoami ¶
func NewResultGetWhoami(whoiam string) (this *ResultGetWhoami)
func (*ResultGetWhoami) Id ¶
func (this *ResultGetWhoami) Id() int
type ResultMessage ¶
type ResultMessage struct { }
func NewResultMessage ¶
func NewResultMessage() (this *ResultMessage)
func (*ResultMessage) Id ¶
func (this *ResultMessage) Id() int
type ResultNotifyPlayer ¶
type ResultNotifyPlayer struct { }
func NewResultNotifyPlayer ¶
func NewResultNotifyPlayer() (this *ResultNotifyPlayer)
func (*ResultNotifyPlayer) Id ¶
func (this *ResultNotifyPlayer) Id() int
type ResultRedirect ¶
type ResultRedirect struct { }
func NewResultRedirect ¶
func NewResultRedirect() (this *ResultRedirect)
func (*ResultRedirect) Id ¶
func (this *ResultRedirect) Id() int
Source Files ¶
- constants.go
- packet_keepalive.go
- packet_message_event.go
- packet_redirect_event.go
- packet_request.go
- packet_result.go
- packet_server_event.go
- request.go
- request_as_proxy.go
- request_as_server.go
- request_authenticate.go
- request_get_details.go
- request_get_players.go
- request_get_salt.go
- request_get_whoami.go
- request_message.go
- request_notify_player.go
- request_redirect.go
Click to show internal directories.
Click to hide internal directories.