Leaves a currently joined Room
More...
#include <LeaveRoomRequest.h>
Inherits Sfs2X::Requests::BaseRequest.
Leaves a currently joined Room
◆ LeaveRoomRequest() [1/2]
Sfs2X::Requests::LeaveRoomRequest::LeaveRoomRequest |
( |
boost::shared_ptr< Room > |
room | ) |
|
Constructor
- Parameters
-
room | any joined Room that you want to leave, if null the last joined Room will be left |
ptrSmartFox->AddEventListener(SFSEvent::USER_EXIT_ROOM, boost::shared_ptr<EventListenerDelegate> (EventListenerDelegate(CMyClass::OnUserExitRoom, (unsigned long long)this));
ptrSmartFox->Send(request);
static void OnUserExitRoom(unsigned long long ptrContext, boost::shared_ptr<BaseEvent> ptrEvent);
void CMyClass::OnUserExitRoom(unsigned long long ptrContext, boost::shared_ptr<BaseEvent> ptrEvent);
{
CMyClass* ptrMyClass = (CMyClass*)ptrContext;
boost::shared_ptr<map<string, boost::shared_ptr<void>>> ptrEventParams = ptrEvent->Params();
boost::shared_ptr<void> ptrEventParamValueRoom = (*ptrEventParams)["room"];
boost::shared_ptr<Room> ptrNotifiedRoom = ((boost::static_pointer_cast<Room>)(ptrEventParamValueRoom));
}
- See also
- Core.SFSEvent.USER_EXIT_ROOM, JoinRoomRequest
◆ LeaveRoomRequest() [2/2]
Sfs2X::Requests::LeaveRoomRequest::LeaveRoomRequest |
( |
| ) |
|