That wouldn't work for me since I'm usign diesel's http stack. The only way I could do that is by yielding HTTP response by myself and not using `http.http_response`.
Thanks and best regards, Manuel. On Nov 26, 3:49 pm, David Shoemaker <[email protected]> wrote: > Hey Manuel, > > I don't think the current version of diesel exposes an interface to the > number of active connections, but you can track that yourself trivially. > Here's a modified version of the echo server > onhttp://dieselweb.org/lib/docsthat does just that: > > from diesel import Application, Service, until, ConnectionClosed > > conns = 0 > def handle_echo(remote_addr): > global conns > conns += 1 > print "%d active" % conns > while True: > try: > _ = yield until('\r\n') > except ConnectionClosed: > conns -= 1 > print "%d active" % conns > > app = Application() > app.add_service(Service(handle_echo, port=8000)) > app.run() > > HTH, > David > > On Thu, Nov 26, 2009 at 10:57 AM, manu <[email protected]> wrote: > > Is there a simple way to know about current open connection in Diesel? > > > Best regards, > > Manuel.
