View previous topic :: View next topic |
Author |
Message |
warbux -
Joined: 31 May 2008 Posts: 2
|
Posted: Sat May 31, 2008 7:15 pm Post subject: How do I limit my connections per usernam? |
|
|
I have a few usernames that will be shared among a group of people. I want to limit each username to 1 connection.
Thanks |
|
Back to top |
|
 |
DonQuichote -
Joined: 24 Dec 2006 Posts: 68 Location: The Netherlands
|
Posted: Sun Jun 01, 2008 6:06 pm Post subject: |
|
|
What do you mean by "one connection"? If you have 3 images on your site, would you want to force them to be loaded one after the other?
HTTP is stateless. Once it appears in your browser, the connection is already gone. There is no connection being left open. Luckily, because the server cannot know when a browser is closed, so any connection would remain open and keep eating resources if this were otherwise.
To overcome this, sessions were introduced. Sessions allow you to store some data on the server and pick it up when a new request is made.
So if you want to block any access, you probably have to use a session to do this. But imagine for one second what happens if you close the browser and try to log in again directly afterwards. Or what happens if a user clicks "open in new tab" instead of "open". How is the server going to know the difference? |
|
Back to top |
|
 |
warbux -
Joined: 31 May 2008 Posts: 2
|
Posted: Sun Jun 01, 2008 6:20 pm Post subject: |
|
|
I understand, wouldnt the ttl disconnect a session after its been idle for so many seconds? I am restricting my server to 3 sessions at any 1 time so my users can download the files I have set in the private directory at a good speed. I was hoping that it would not allow more then 1 session per username. The way its set up now if I have 3 users downloading files I cant get in on the admin session.
I know ftp would be easier, but every ftp server disconnects people after 10 minutes. I have not been able to find anyway around it except buying a new router. |
|
Back to top |
|
 |
|