SmartFoxServer 3 C++ Client API 3.1.0-beta
Client API for SmartFoxServer 3
Loading...
Searching...
No Matches
sfs3::requests::CreateRoomRequest Class Reference

Creates a new Room in the current Zone. More...

#include <CreateRoomRequest.h>

Inheritance diagram for sfs3::requests::CreateRoomRequest:
[legend]

Public Member Functions

 CreateRoomRequest (RoomSettings settings, bool autoJoin=false, std::shared_ptr< entities::Room > roomToLeave=nullptr)

Detailed Description

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).

See also
RoomSettings

Constructor & Destructor Documentation

◆ CreateRoomRequest()

sfs3::requests::CreateRoomRequest::CreateRoomRequest ( RoomSettings settings,
bool autoJoin = false,
std::shared_ptr< entities::Room > roomToLeave = nullptr )
inline
Parameters
settingsthe settings describing the Room to create
autoJoinwhether the current user should join the Room right after creating it
roomToLeavethe Room the user should leave while joining the new one; if nullptr, no Room is left

The documentation for this class was generated from the following files:
  • requests/CreateRoomRequest.h
  • requests/CreateRoomRequest.cpp