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

Subscribes the current user to Room-related events occurring in the specified Group. More...

#include <SubscribeRoomGroupRequest.h>

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

Public Member Functions

 SubscribeRoomGroupRequest (std::string groupId)
 Creates a new SubscribeRoomGroupRequest.

Detailed Description

Subscribes the current user to Room-related events occurring in the specified Group.

This allows the user to be notified of specific Room events even if he didn't join the Room from which the events originated, provided the Room belongs to the subscribed Group.

If the subscription operation is successful, the current user receives a roomGroupSubscribe event; otherwise the roomGroupSubscribeError event is fired. Only Groups marked as public in the Zone configuration can be subscribed by a client.

See also
event::SFSEvent::ROOM_GROUP_SUBSCRIBE
event::SFSEvent::ROOM_GROUP_SUBSCRIBE_ERROR
UnsubscribeRoomGroupRequest

Subscribes the current user to the Room events of one Group.

After this, the user is notified of the events of a Room even if he did not join it, as long as the Room belongs to the subscribed Group.

On success the current user receives a event::SFSEvent::ROOM_GROUP_SUBSCRIBE event, otherwise a event::SFSEvent::ROOM_GROUP_SUBSCRIBE_ERROR event.

See also
event::SFSEvent::ROOM_GROUP_SUBSCRIBE
event::SFSEvent::ROOM_GROUP_SUBSCRIBE_ERROR
UnsubscribeRoomGroupRequest

Constructor & Destructor Documentation

◆ SubscribeRoomGroupRequest()

sfs3::requests::SubscribeRoomGroupRequest::SubscribeRoomGroupRequest ( std::string groupId)
inline

Creates a new SubscribeRoomGroupRequest.

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

Parameters
groupIdThe name of the Room Group to subscribe.
See also
SmartFox::send
entities::Room::getGroupId

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