Documentation ¶
Index ¶
- Constants
- func CloseRoomPacket(data string) cws.WSPacket
- func ConfigRequestPacket(conf []byte) cws.WSPacket
- func GetRoomPacket(data string) cws.WSPacket
- func IceCandidatePacket(data string, sessionId string) cws.WSPacket
- func RegisterRoomPacket(data string) cws.WSPacket
- func ServerIdPacket(id string) cws.WSPacket
- func TerminateSessionPacket(sessionId string) cws.WSPacket
- type ConfPushCall
- type ConnectionRequest
- type GameStartCall
- type GameStartRequest
Constants ¶
View Source
const ( GetRoom = "get_room" CloseRoom = "close_room" RegisterRoom = "register_room" Heartbeat = "heartbeat" IceCandidate = "ice_candidate" NoData = "" InitWebrtc = "init_webrtc" Answer = "answer" GameStart = "start" GameQuit = "quit" GameSave = "save" GameLoad = "load" GamePlayerSelect = "player_index" GameMultitap = "multitap" )
View Source
const ( ServerId = "server_id" TerminateSession = "terminateSession" )
Variables ¶
This section is empty.
Functions ¶
func CloseRoomPacket ¶
func ConfigRequestPacket ¶
func GetRoomPacket ¶
func RegisterRoomPacket ¶
func ServerIdPacket ¶
func TerminateSessionPacket ¶
Types ¶
type ConfPushCall ¶
type ConfPushCall struct {
Data []byte `json:"data"`
}
func (*ConfPushCall) From ¶
func (packet *ConfPushCall) From(data string) error
func (*ConfPushCall) To ¶
func (packet *ConfPushCall) To() (string, error)
type ConnectionRequest ¶ added in v2.6.0
type GameStartCall ¶
type GameStartCall struct { Name string `json:"name"` Base string `json:"base"` Path string `json:"path"` Type string `json:"type"` }
func (*GameStartCall) From ¶
func (packet *GameStartCall) From(data string) error
func (*GameStartCall) To ¶
func (packet *GameStartCall) To() (string, error)
type GameStartRequest ¶
type GameStartRequest struct {
GameName string `json:"game_name"`
}
func (*GameStartRequest) From ¶
func (packet *GameStartRequest) From(data string) error
Click to show internal directories.
Click to hide internal directories.