|
SmartFoxServer 3 C++ Client API 3.1.0-beta
Client API for SmartFoxServer 3
|
Creates a new Room in the current Zone. More...
#include <CreateRoomRequest.h>
Public Member Functions | |
| CreateRoomRequest (RoomSettings settings, bool autoJoin=false, std::shared_ptr< entities::Room > roomToLeave=nullptr) | |
Creates a new Room in the current Zone.
If the creation is successful, a ROOM_ADD event is dispatched to all the users who subscribed the Group to which the Room is associated, including the Room's creator. Otherwise the ROOM_CREATION_ERROR event is dispatched to the requester's client.
When autoJoin is requested the server sends two separate responses: the Room creation first (ROOM_ADD), then the Room join (ROOM_JOIN).
|
inline |
| settings | the settings describing the Room to create |
| autoJoin | whether the current user should join the Room right after creating it |
| roomToLeave | the Room the user should leave while joining the new one; if nullptr, no Room is left |