LeaveRoomRequest Class |
Namespace: Sfs2X.Requests
public class LeaveRoomRequest : BaseRequest
Name | Description | |
---|---|---|
LeaveRoomRequest |
See LeaveRoomRequest(Room) constructor.
| |
LeaveRoomRequest(Room) |
Creates a new LeaveRoomRequest instance.
|
void SomeMethod() { sfs.AddEventListener(SFSEvent.USER_EXIT_ROOM, OnUserExitRoom); // Leave the last joined Room sfs.Send( new LeaveRoomRequest() ); } void OnUserExitRoom(BaseEvent evt) { User user = (User)evt.Params["user"]; Room room = (Room)evt.Params["room"]; Console.WriteLine(""User " + user.Name + " just left Room " + room.Name); // .Net / Unity System.Diagnostics.Debug.WriteLine(""User " + user.Name + " just left Room " + room.Name); // UWP }