How To Create A Room

With the Room module, you may create rooms with a fixed number of allowed members with optional settings for the room.

OnCreate is raised when you invoke this method.

If a UDP client is used, the message is sent as an RUDP.

// Maximum number of members for this room
int maxMembers = 10;

// If true, the room will not be discard when it is empty
bool allowEmpty = false;

// If true, the creator will automatically join the room created
bool join = true;

// TTL of the room in seconds when it is empty (this is only effective when allowEmpty=true)
int ttl = 60;

// Broadcast message buffering interval in milliseconds to lessen server stress
int interval = 200;

room.Create(maxMembers, allowEmpty, join, ttl, interval);