managers

package
v1.0.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PlayerMgr = PlayerManager{}
View Source
var ServerMgr = &ServerManager{}

Functions

This section is empty.

Types

type Player

type Player struct {
	Session easysocket.ISession
}

type PlayerManager

type PlayerManager struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*PlayerManager) Add

func (pm *PlayerManager) Add(player *Player)

func (*PlayerManager) Get

func (pm *PlayerManager) Get(connId uint32) *Player

func (*PlayerManager) Remove

func (pm *PlayerManager) Remove(session easysocket.ISession)

type ServerItem

type ServerItem struct {
	Session easysocket.ISession
	Count   int
}

type ServerManager

type ServerManager struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*ServerManager) Add

func (m *ServerManager) Add(item *ServerItem)

func (*ServerManager) Get

func (m *ServerManager) Get(id uint32) *ServerItem

func (*ServerManager) Remove

func (m *ServerManager) Remove(session easysocket.ISession)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL