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

Retrieves a list of Rooms from the server which match the specified criteria. More...

#include <FindRoomsRequest.h>

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

Public Member Functions

 FindRoomsRequest (entities::match::MatchExpression expr, std::optional< std::string > groupId=std::nullopt, int16_t limit=0)
 Creates a new FindRoomsRequest.

Detailed Description

Retrieves a list of Rooms from the server which match the specified criteria.

By providing a matching expression and a search scope (a Group or the entire Zone), SmartFoxServer can find those Rooms matching the passed criteria and return them by means of the roomFindResult event.

The Rooms carried by that event are detached snapshots: they are not added to the local Room list and are not managed by the RoomManager, so they must be treated as read-only search results.

See also
entities::match::MatchExpression
event::SFSEvent::ROOM_FIND_RESULT

Constructor & Destructor Documentation

◆ FindRoomsRequest()

sfs3::requests::FindRoomsRequest::FindRoomsRequest ( entities::match::MatchExpression expr,
std::optional< std::string > groupId = std::nullopt,
int16_t limit = 0 )
inline

Creates a new FindRoomsRequest.

Pass it to SmartFox::send for the request to be performed.

Parameters
exprA matching expression that the system will use to retrieve the Rooms.
groupIdThe name of the Group where to search for matching Rooms; if empty, the search is performed in the whole Zone.
limitThe maximum size of the list of Rooms that will be returned by the roomFindResult event. If 0, the Zone's own limit is applied.
See also
SmartFox::send
event::SFSEvent::ROOM_FIND_RESULT

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