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

Leaves one of the Rooms joined by the current user. More...

#include <LeaveRoomRequest.h>

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

Public Member Functions

 LeaveRoomRequest (std::shared_ptr< entities::Room > room=nullptr)
 Creates a new LeaveRoomRequest.

Detailed Description

Leaves one of the Rooms joined by the current user.

Depending on the events setting the Room got at creation time, two events can be fired: every user inside the Room, the current one included, gets a event::SFSEvent::USER_EXIT_ROOM event, and every client that subscribed the Group of the Room gets a event::SFSEvent::USER_COUNT_CHANGE event.

See also
event::SFSEvent::USER_EXIT_ROOM
event::SFSEvent::USER_COUNT_CHANGE
RoomSettings::events

Constructor & Destructor Documentation

◆ LeaveRoomRequest()

sfs3::requests::LeaveRoomRequest::LeaveRoomRequest ( std::shared_ptr< entities::Room > room = nullptr)

Creates a new LeaveRoomRequest.

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

Parameters
roomThe Room the current user must leave. When it is nullptr the last joined Room is left.
See also
SmartFox::send
entities::Room

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