Documentation ¶
Index ¶
- type Room
- func (r *Room) AddConnectionToRoom(peerconnection *webrtc.WebRTC, playerIndex int)
- func (r *Room) CleanSession(peerconnection *webrtc.WebRTC)
- func (r *Room) Close()
- func (r *Room) IsPCInRoom(w *webrtc.WebRTC) bool
- func (r *Room) IsRunningSessions() bool
- func (r *Room) LoadGame() error
- func (r *Room) SaveGame() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Room ¶
type Room struct { ID string // State of room IsRunning bool // Done channel is to fire exit event when room is closed Done chan struct{} // contains filtered or unexported fields }
Room is a game session. multi webRTC sessions can connect to a same game. A room stores all the channel for interaction between all webRTCs session and emulator
func (*Room) AddConnectionToRoom ¶
func (*Room) CleanSession ¶
func (*Room) IsPCInRoom ¶
TODO: Reuse for remove Session
func (*Room) IsRunningSessions ¶
Click to show internal directories.
Click to hide internal directories.