Set max idle time per zone? And using smartfox on a website

Post here all your questions related with SmartFoxServer .Net/Unity3D API

Moderators: Lapo, Bax

User avatar
death_au
Posts: 8
Joined: 23 Mar 2010, 03:17

Set max idle time per zone? And using smartfox on a website

Postby death_au » 12 Apr 2010, 00:38

Can you set the max user idle time to be different for specific zones? I couldn't seem to find the answer to this anywhere, so I'm guessing it's a no, but I wanted to ask anyway.

The reason is, I'm setting up this system that's based on web pages, as I'm trying to make an educational system that doesn't require special browser plugins like Flash or Unity (even if that would make my life much easier).
What I'm trying to do is set up an ASP.NET webpage, that connects to a zone using smartfox, and using an ajax timer to implement a keep-alive system with a short timeout so that other users can tell when someone disconnects by closing the browser window.
Once that part of the system is up and running, it shouldn't be too hard to receive smartfox events server-side and refresh ajax update panels based on the data received.

Or does anyone have any better suggestions?
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 12 Apr 2010, 04:48

I dont think there is max idle time per zone, no. I wonder if you can implement it using a custom login. Record login time on per connection basis and refresh that for each command received.

/Thomas
User avatar
death_au
Posts: 8
Joined: 23 Mar 2010, 03:17

Postby death_au » 13 Apr 2010, 07:30

ThomasLund wrote:I dont think there is max idle time per zone, no. I wonder if you can implement it using a custom login. Record login time on per connection basis and refresh that for each command received.

/Thomas

Thanks Thomas, I was thinking of something along those lines. But how do I write an extension that will kick a user if it hasn't received an input within the specified time period?
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 13 Apr 2010, 18:04

I'm pretty sure you could use the scheduler for that - run through connections and check the custom idle time every 5 seconds and kick those that are idle.

But havent tried that myself. But thats what I would try

/Thomas

Return to “.Net / Unity3D API”

Who is online

Users browsing this forum: No registered users and 9 guests