Documentation ¶
Index ¶
- Constants
- type CamData
- type Coordinates
- type Enrichment
- type Enrichments
- type EntityNumEnrichment
- type EventKey
- type GameEventData
- type GameEventDescription
- type HLAEServer
- func (h *HLAEServer) BroadcastRCON(cmd string) error
- func (h *HLAEServer) RegisterCamHandler(handler func(*CamData))
- func (h *HLAEServer) RegisterEventHandler(handler func(*GameEventData))
- func (h *HLAEServer) RegisterHandler(handler func(HLAEServerCommand))
- func (h *HLAEServer) RegisterLevelInitHandler(handler func(string))
- func (h *HLAEServer) SendRCON(k int, cmd string) error
- func (h *HLAEServer) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (h *HLAEServer) TransBegin() error
- func (h *HLAEServer) TransEnd() error
- type HLAEServerArguments
- type HLAEServerCommand
- type HLAESession
- type UserIDEnrichment
Constants ¶
const ( KEYTYPE_STRING int32 = iota + 1 KEYTYPE_FLOAT32 KEYTYPE_INT32 KEYTYPE_INT16 KEYTYPE_INT8 KEYTYPE_BOOLEAN KEYTYPE_BIGUINT64 KEYTYPE_UNKNOWN )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CamData ¶
type CamData struct { Time float32 XPos float32 YPos float32 ZPos float32 XRot float32 YRot float32 ZRot float32 Fov float32 }
CamData Camera data
type Coordinates ¶
Coordinates include float32 X/Y/Z Pos coordinates.
type Enrichment ¶
type Enrichments ¶
type Enrichments map[string]map[string]Enrichment
type EntityNumEnrichment ¶
type EntityNumEnrichment struct { Origin Coordinates Angles Coordinates KeyValue string // contains filtered or unexported fields }
EntityNumEnrichment containns Entity's Origin/Angles.
func (*EntityNumEnrichment) GetEnrichment ¶
func (e *EntityNumEnrichment) GetEnrichment() []string
func (*EntityNumEnrichment) GetMap ¶
func (e *EntityNumEnrichment) GetMap() map[string]interface{}
GetMap EntityNum Enrichment
func (*EntityNumEnrichment) SetEnrichment ¶
func (e *EntityNumEnrichment) SetEnrichment(en []string)
func (*EntityNumEnrichment) Unserialize ¶
func (e *EntityNumEnrichment) Unserialize(r io.Reader) error
GetMap EntityNum Enrichment
type GameEventData ¶
type GameEventData struct { Name string ClientTime float32 Keys map[string]string // Even value is float32 or int etc. convert to string }
GameEventData Game event keys and time
type GameEventDescription ¶
type GameEventDescription struct { EventID int32 EventName string Keys []EventKey // KeyName->Key type // contains filtered or unexported fields }
GameEventDescription include Event ID, Name, Keys etc.
func (*GameEventDescription) Unserialize ¶
func (e *GameEventDescription) Unserialize(r io.Reader) (*GameEventData, error)
Unserialize parse EventDescription
type HLAEServer ¶
type HLAEServer struct {
// contains filtered or unexported fields
}
HLAEServer Main struct
func New ¶
func New(args HLAEServerArguments) (srv *HLAEServer, err error)
New Get new instance of HLAEServer
func (*HLAEServer) BroadcastRCON ¶
func (h *HLAEServer) BroadcastRCON(cmd string) error
BroadcastRCON broadcast command
func (*HLAEServer) RegisterCamHandler ¶
func (h *HLAEServer) RegisterCamHandler(handler func(*CamData))
RegisterCamHandler to handle each requests
func (*HLAEServer) RegisterEventHandler ¶
func (h *HLAEServer) RegisterEventHandler(handler func(*GameEventData))
RegisterEventHandler to handle each requests
func (*HLAEServer) RegisterHandler ¶
func (h *HLAEServer) RegisterHandler(handler func(HLAEServerCommand))
RegisterHandler to handle each requests
func (*HLAEServer) RegisterLevelInitHandler ¶
func (h *HLAEServer) RegisterLevelInitHandler(handler func(string))
func (*HLAEServer) SendRCON ¶
func (h *HLAEServer) SendRCON(k int, cmd string) error
SendRCON Send RCON to specific client
func (*HLAEServer) ServeHTTP ¶
func (h *HLAEServer) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements http.Handler interfaces
func (*HLAEServer) TransBegin ¶
func (h *HLAEServer) TransBegin() error
TransBegin Start transaction
type HLAEServerArguments ¶
type HLAEServerCommand ¶
type HLAEServerCommand string
HLAEServerCommand server command types
const ( ServerCommandHello HLAEServerCommand = "hello" ServerCommandDataStop HLAEServerCommand = "dataStop" ServerCommandDataStart HLAEServerCommand = "dataStart" ServerCommandLevelInit HLAEServerCommand = "levelInit" ServerCommandLevelShutdown HLAEServerCommand = "levelShutdown" ServerCommandCam HLAEServerCommand = "cam" ServerCommandGameEvent HLAEServerCommand = "gameEvent" )
type HLAESession ¶
type HLAESession struct {
*melody.Session
}
HLAESession wraps some session-related functions and is also a melody.Session wrapper
func (HLAESession) SetUUID ¶
func (s HLAESession) SetUUID(uuid uuid.UUID)
SetUUID set a new unified id for this session
func (HLAESession) UUID ¶
func (s HLAESession) UUID() uuid.UUID
UUID returns unified id for this session
func (HLAESession) UUIDAsLogField ¶
func (s HLAESession) UUIDAsLogField() zap.Field
UUIDAsLogField creates a zap.Field representing session uuid
type UserIDEnrichment ¶
type UserIDEnrichment struct { XUID *big.Int EyeOrigin Coordinates EyeAngles Coordinates KeyValue string // contains filtered or unexported fields }
UserIDEnrichment contains User informations with XUID/Eyeorigins(Coordinates)/EyeAngles(Coordinates)
func (*UserIDEnrichment) GetEnrichment ¶
func (u *UserIDEnrichment) GetEnrichment() []string
func (*UserIDEnrichment) GetMap ¶
func (u *UserIDEnrichment) GetMap() map[string]interface{}
GetMap UserID Enrichment to map
func (*UserIDEnrichment) SetEnrichment ¶
func (u *UserIDEnrichment) SetEnrichment(en []string)
func (*UserIDEnrichment) Unserialize ¶
func (u *UserIDEnrichment) Unserialize(r io.Reader) error
Unserialize Unserialize into u