Multiple loging problem

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

Post Reply
gbala
Posts: 15
Joined: 13 Apr 2009, 14:05

Multiple loging problem

Post by gbala »

Hi,
I am using SFS 1.6.9 pro. My need is something like some user needs to listen to all the rooms in the zone. and others will be in their own rooms. and the rooms are created dynamically as the users enter the particular page.

I try something like it will join the default room and then on join room event i am getting the list of all rooms and inside for loop i am placing joinRoom the first time the joinRoom is sending the request but the next time it comes into the loop it is not sending any request to the SFS can any one help me out.

I am using the join room like
Smartfoxclient.joinRoom(room.getName(), "", false, true,-1);
where the room has the list of all the room.

Can any one help me out.
BigFIsh
Posts: 1698
Joined: 25 Feb 2008, 19:26
Location: New Zealand

Post by BigFIsh »

This seems like a bad design. What are you trying to achieve here?
Smartfox's forum is my daily newspaper.
gbala
Posts: 15
Joined: 13 Apr 2009, 14:05

Post by gbala »

Hi BigFIsh,

Thanks for your replay.

The need is like there is a zone and a default room.
I am having multiple pages in front end and all pages has it's own chat page. On entering each page a dynamic room will be created so that the person entering the same page will be able to chat with each other.

There are some super power user's where they must be able to view the conversation in all the pages and he must be able to response to all user at one short or he must also be able to sent a private message to a single person in one of the room. Please help me out.

Thanks in Advance.
BigFIsh
Posts: 1698
Joined: 25 Feb 2008, 19:26
Location: New Zealand

Post by BigFIsh »

Have you considered intercepting public messages via server side? (refer to http://www.smartfoxserver.com/docs/docP ... essage.htm for example of how this works)

That way, you can 'forward' a copy of all public messages to the super user.

As for sending a message to all users, you can easily do this via serverside. Simply fetch all the users in a zone, and then use the sendResponse method to send a special message to all users. As for sending a private message, again - that can be done using the same approach as above.
Smartfox's forum is my daily newspaper.
gbala
Posts: 15
Joined: 13 Apr 2009, 14:05

Post by gbala »

Hi BigFIsh,
Great Thanks,
I was struggling a lot to make it but with your help and guid it gave me a confident to make it. Now i made it and the function's are working fine for me

Thanks a lot
Post Reply