SubscribeRoomGroupRequest Class |
Namespace: Sfs2X.Requests
public class SubscribeRoomGroupRequest : BaseRequest
The SubscribeRoomGroupRequest type exposes the following members.
Name | Description | |
---|---|---|
SubscribeRoomGroupRequest |
Creates a new SubscribeRoomGroupRequest instance.
|
void SomeMethod() { sfs.AddEventListener(SFSEvent.ROOM_GROUP_SUBSCRIBE, OnSubscribeRoomGroup); sfs.AddEventListener(SFSEvent.ROOM_GROUP_SUBSCRIBE_ERROR, OnSubscribeRoomGroupError); // Subscribe the "card_games" group sfs.Send( new SubscribeRoomGroupRequest("card_games") ); } void OnSubscribeRoomGroup(BaseEvent evt) { Console.WriteLine("Group subscribed. The following rooms are now accessible: " + (List<Room>)evt.Params["newRooms"]); // .Net / Unity System.Diagnostics.Debug.WriteLine("Group subscribed. The following rooms are now accessible: " + (List<Room>)evt.Params["newRooms"]); // UWP } void OnSubscribeRoomGroupError(BaseEvent evt) { Console.WriteLine("Group subscription failed: " + (string)evt.Params["errorMessage"]); // .Net / Unity System.Diagnostics.Debug.WriteLine("Group subscription failed: " + (string)evt.Params["errorMessage"]); // UWP }