Documentation ¶
Index ¶
- Constants
- type Game
- type GameState
- type Player
- func (p *Player) Cleanup()
- func (p *Player) Connect(conn *network.Conn)
- func (p *Player) GetLastHeartbeatTime() int64
- func (p *Player) GetSendFrameCount() uint32
- func (p *Player) IsOnline() bool
- func (p *Player) RefreshHeartbeat()
- func (p *Player) SendMessage(msg network.Packet)
- func (p *Player) SetSendFrameCount(c uint32)
Constants ¶
View Source
const ( // maximum preparation time. // If no one connects after this time, just shut down the game MaxReadyTime int64 = 20 // maximum number of frames per game MaxGameFrame uint32 = 30*60*3 + 100 // the interval of broadcast frame data BroadcastOffsetFrames = 3 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Game ¶
type Game struct { State GameState // contains filtered or unexported fields }
Game represents a game
func (*Game) ProcessMsg ¶
ProcessMsg handles the message
type Player ¶
type Player struct {
// contains filtered or unexported fields
}
Player defines a player state
func (*Player) GetLastHeartbeatTime ¶
func (*Player) GetSendFrameCount ¶
func (*Player) RefreshHeartbeat ¶
func (p *Player) RefreshHeartbeat()
func (*Player) SendMessage ¶
func (*Player) SetSendFrameCount ¶
Click to show internal directories.
Click to hide internal directories.