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 on
http://dieselweb.org/lib/docs that 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.
>