package roomsupport
import "github.com/Diarkis/diarkis/roomsupport"
Index
- func AfterRandomRoomCmd(callback func(uint8, uint16, []byte, *user.User, func(error)))
- func BeforeRandomRoomCmd(callback func(uint8, uint16, []byte, *user.User, func(error)))
- func DefineRoomSupport()
- func ExposeCommands()
- func IsRandomRoomCreated(payload []byte) bool
Functions
func AfterRandomRoomCmd
func AfterRandomRoomCmd(callback func(uint8, uint16, []byte, *user.User, func(error)))
AfterRandomRoomCmd registers a callback function to be executed before random join room command:
Important
Must be called before ExposeCommands
func BeforeRandomRoomCmd
func BeforeRandomRoomCmd(callback func(uint8, uint16, []byte, *user.User, func(error)))
BeforeRandomRoomCmd registers a callback function to be executed before random join room command:
Important
Must be called before ExposeCommands
func DefineRoomSupport
func DefineRoomSupport()
DefineRoomSupport required to use roomsupport.ExposeCommands - This function MUST be called in HTTP server ONLY
func ExposeCommands
func ExposeCommands()
ExposeCommands exposes optional commands for room.
Important
room.ExposeCommands must be called BEFORE calling this function
Important
roomsupport.DefineRoomSupport() MUST be called in HTTP server for this function to work
This function exposes the following commands to the server:
- Random Room Join
- Register Room
- Find Registered Room By Type
- Sync and Update Objects
- Chat Sync and Log
- Start P2P
func IsRandomRoomCreated
func IsRandomRoomCreated(payload []byte) bool
IsRandomRoomCreated returns true if the given payload byte array of RandomRoomJoin has created a room. This function is meant to be used with AfterRandomRoomCmd.