<html>
<font face="Courier New, Courier">I use Twisted Web on an embedded Linux
device to provide browser-based configuration &amp; control. The browser
displays a bar graph of a parameter that is quickly changing on the
embedded device (peak audio level). In order to provide a reasonable
feedback to the user, the browser connects to the Twisted Web CGI server
once a second via XMLHTTPRequest to obtain an updated bar graph level,
then Twisted Web dutifully closes the connection. Is there a way to
achieve the same thing without opening &amp; closing a connection each
time?<br><br>
My code:<br><br>
# ----- Set up the web/CGI server to handle browser-based control
-----<br>
from twisted.web import server, static, twcgi<br>
root = static.File(&quot;/myResourceDir&quot;)<br>
root.putChild(&quot;cgi-bin&quot;,
twcgi.CGIDirectory(&quot;/myResourceDir/cgi-bin&quot;))<br>
reactor.listenTCP(8000, server.Site(root))<br><br>
Thank you.<br>
</font></html>