Gamecontrollers

package
Version: v0.0.0-...-1446c6c Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppController

type AppController struct {
	// contains filtered or unexported fields
}

AppController handles the welcome screen that allows user to pick a technology and username.

func (*AppController) Get

func (this *AppController) Get()

Get implemented Get() method for AppController.

func (*AppController) Join

func (this *AppController) Join()

Join method handles POST requests for AppController.

func (*AppController) Prepare

func (this *AppController) Prepare()

Prepare implemented Prepare() method for baseController. It's used for language option check and setting.

type SocketId

type SocketId struct {
	SocketId uint32
}

type SocketInfo

type SocketInfo struct {
	SocketId uint32
	User     gameserver.IM_protocol_user
	Conn     *websocket.Conn
}

带用户信息的websocket

type UnSocketId

type UnSocketId struct {
	SocketId uint32
}

type WebSocketController

type WebSocketController struct {
	// contains filtered or unexported fields
}

WebSocketController handles WebSocket requests.

func (*WebSocketController) Get

func (this *WebSocketController) Get()

Get method handles GET requests for WebSocketController.

func (*WebSocketController) Prepare

func (this *WebSocketController) Prepare()

Prepare implemented Prepare() method for baseController. It's used for language option check and setting.

func (*WebSocketController) Socket

func (this *WebSocketController) Socket()

Join method handles WebSocket requests for WebSocketController.

type WebSocketListController

type WebSocketListController struct {
	// Channel for new join users.
	SocketChan chan SocketInfo
	// Channel for exit users.
	UnSocketChan chan UnSocketId
	// Send events here to publish them.
	MsgList chan (gameserver.IM_protocol)
	// Long polling waiting list.
	ActiveSocketList *list.List
	beego.Controller
}

func (*WebSocketListController) BCGame

func (this *WebSocketListController) BCGame(event gameserver.IM_protocol)

func (*WebSocketListController) Game

func (this *WebSocketListController) Game(event gameserver.IM_protocol)

func (*WebSocketListController) HeartWebSocket

func (this *WebSocketListController) HeartWebSocket(event gameserver.IM_protocol)

func (*WebSocketListController) IsExistSocketById

func (this *WebSocketListController) IsExistSocketById(SocketId uint32) bool

func (*WebSocketListController) NetRussia

func (this *WebSocketListController) NetRussia()

func (*WebSocketListController) NewMsg

func (this *WebSocketListController) NewMsg(ep gameserver.EventType, user gameserver.IM_protocol_user, SocketId uint32, msg string) gameserver.IM_protocol

func (*WebSocketListController) SocketJoin

func (this *WebSocketListController) SocketJoin(SocketId uint32, ws *websocket.Conn)

func (*WebSocketListController) SocketLeave

func (this *WebSocketListController) SocketLeave(SocketId uint32)

Jump to

Keyboard shortcuts

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