Documentation ¶
Index ¶
- type AppController
- type SocketId
- type SocketInfo
- type UnSocketId
- type WebSocketController
- type WebSocketListController
- func (this *WebSocketListController) BCGame(event gameserver.IM_protocol)
- func (this *WebSocketListController) Game(event gameserver.IM_protocol)
- func (this *WebSocketListController) HeartWebSocket(event gameserver.IM_protocol)
- func (this *WebSocketListController) IsExistSocketById(SocketId uint32) bool
- func (this *WebSocketListController) NetRussia()
- func (this *WebSocketListController) NewMsg(ep gameserver.EventType, user gameserver.IM_protocol_user, SocketId uint32, ...) gameserver.IM_protocol
- func (this *WebSocketListController) SocketJoin(SocketId uint32, ws *websocket.Conn)
- func (this *WebSocketListController) SocketLeave(SocketId uint32)
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.
type SocketInfo ¶
带用户信息的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)
Click to show internal directories.
Click to hide internal directories.