Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new

Learn more

View all

Sign in to view all badges

Monitoring Room Bandwidth and Locking Rooms

Level 3
Level 3

Hello everyone!

I have a question about room bandwidth that is crucial to our site design being practical and cost effective.

When a user/customer signs up on our web site, a room will be created programmatically for them and they can use it whenever they sign in.

Once a room is set up, is there any way to programmatically monitor it so as to watch bandwidth/costs and lock the room when a certain bandwidth limit is exceeded?  What we want to do is allow each user to have a cost limit (similar to the LCCS developer account limit of $15), and when they exceed it the room is locked until we unlock it.  I would love to use a server side script like PHP to do this.  Can a Flex app. even run quietly in the background and do this?  I apologize if I`m missing something and looking at this the wrong way.  We are just terrified that a malevolent user might somehow use his/her room for a purpose other than for what it was intended, or overuse the room, and drive our costs through the roof!

Thanks in advance for all your help and keep up the good work guys!


4 Replies
Level 10
Level 10

Hi Matt,

I tried googling "lccs create rooms on the fly" :

and it led me right to Chapter 6 of the LCCS Developer Guide. I'll leave

the reading to you =).

For your second question, we don't have any APIs for monitoring bandwidth.

This is something we're definitely thinking about; in the meantime, you can

set the usage cap of your application (a whole set of rooms) to prevent your

bill from ever going over what you're able to pay. Likewise, you can monitor

your rooms for activity (whether or not there are users active, and how many

messages they're sending) using the hooks in the server-to-server APIs (see

chapter 7 of the dev guide).

Ultimately, the best way to prevent abuse is to focus on authentication,

and come up with your own login so that it's non-trivial for a hacker to

access your LCCS rooms. Chapter 6.4 has the details for this.


Level 3
Level 3

Hi Nigel!

Thanks for the info.!

Yeah, about 5 minutes after posting my original message, I had a nagging feeling I had read about the programmatic provisioning somewhere before.  I checked the Developer Guide and sure enough, there it was!  I went right back into the forum and changed my post 😃  Sorry to waste your time with that one!

I just had one more quick question.  Is there a way to limit the amount of users in a room at one time.  I want to limit the amount of people that can be logged into the service at one time to 2 (or 3).  The way my rooms are set up, there is a host with his own application and one guest with their own application.  The host application has a roster and a couple of other controls that the guest should not have.  When the guest enters the room, he has to knock and be allowed into the chat by the host.  Having this setup should also have the side effect of reducing bandwidth costs as well.

Thanks again Nigel!


Level 10
Level 10

Hi Matt,

You can set the user limit on the room (see the room console's "manage"

tab, or RoomManager), but not at the account level. You could use server

APIs every time a user wants to come in, and check your pool of rooms to see

how many people are in them (I think Raff can elaborate), and just not allow

the user in if you have too many in the account.

hope that helps


Level 1
Level 1

Hi Matt

it`s can be php function getRoomInfo()

return xml


<status code="ok"/>


<name>na2-sdk-a6808cea-1ebf-49dc-a652-d0ad41c1c/yuor room</name>








<application-id>na2-sdk-a6808cea-1ebf-49dc-a652-75aad41c1c/your app</application-id>









<date-created>Sat Apr 30 03:35:36 EDT 2011</date-created>

<date-started>Sat Apr 30 03:35:38 EDT 2011</date-started>