Re: Hi All, I am a newbee for cherrypy. My question is how to realize a link limitation for cherry?

Tim Roberts <[email protected]>
Newsgroups gmane.comp.python.cherrypy
Organization Providenza & Boekelheide, Inc.
Message-ID <[email protected]>
Zhao Kevin wrote:
>
>        I am a new comer for cherrypy. It is really a convenient web
> frame ~ 
> I want to realize a function as below:
>        After the cherry https server start , in the first browse ,
> type into the ip and get access to the  server.
>        In another browse , type into the ip address , the server
> reject the another access until the first access is over.
>        So, I want to set the server only allow once connection at the
> same time ... How can I realize it ? Is there any configuration
> parameters I should to set ?

That's simply not how HTTP works.  When a browser makes a request, the
server sends back a page of HTML, typically within less then a second,
and then the connection is terminated.  The browser will eventually
display what it received, and fetch other resources like stylesheets and
images, but those are all totally separate requests.

It is a common mistake among beginners to think that the connection to
the server is maintained as long as the page is displayed (I know my
wife believes that), but it's not true.  There's a quick connect,
transfer, and disconnect, then the rest happens in the browser without a
connection.

So, it doesn't make any sense to allow one connection at a time.  I
suppose you could have the concept of an "active login" where no one
else could log in while the first user was there, but you'd have to
implement that yourself, by remembering the currently logged in user in
some common location.  But remember, there is no guarantee that you're
going to get a logout request.  If the user logs in, and then switches
to Google, your site would be locked out.

-- 
Tim Roberts, [email protected]
Providenza & Boekelheide, Inc.

-- 
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cherrypy-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
To post to this group, send email to cherrypy-users-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.