Hi,
How can i manually create room on server side using extensions when a client fire a CreateRoomRequest ?
I see in the SFSEventType class, there is ROOM_ADDED event but it is fired after a room is created.
Thank you.
How to handle create room request on server side
You can't put your logic in the middle of a default client request.
You have to use your extension:
- from the client send a custom extension request containing the data you need to create the room;
- make your validations and then create the room on the server-side using SFSApi.createRoom;
- if you like you could also fine tune the user permissions by inhibiting the client-side CreateRoomRequest using the Privilege Manager in the Admin Tool: this will eventually prevent malicious clients to send room creation commands.
You have to use your extension:
- from the client send a custom extension request containing the data you need to create the room;
- make your validations and then create the room on the server-side using SFSApi.createRoom;
- if you like you could also fine tune the user permissions by inhibiting the client-side CreateRoomRequest using the Privilege Manager in the Admin Tool: this will eventually prevent malicious clients to send room creation commands.
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Who is online
Users browsing this forum: No registered users and 97 guests