#!/usr/bin/python # tz_multi_client_web_server.py # --copyright-- Copyright 2011 (C) Tranzoa, Co. All rights reserved. Warranty: You're free and on your own here. This code is not necessarily up-to-date or of public quality. # --url-- http://www.tranzoa.net/tzpython/ # --email-- pycode is the name to send to. tranzoa.com is the place to send to. # --bodstamps-- # November 16, 2011 bar # November 19, 2011 bar macro_data param # pass log routine to macro processor # make the default main page "index.htm" # update client when whenever anything is sent to it OK # don't log errors on pull - remote disconnects # November 20, 2011 bar change "restart" to "lobotomize" # charset, defaults to utf8 # November 22, 2011 bar read multiple 'json' args from clients # November 29, 2011 bar pyflake cleanup # December 10, 2011 bar put the client name in messages, too # December 14, 2011 bar ah. module name with the ARG names # March 20, 2012 bar set_macro_data() # March 22, 2012 bar be cleaner about flight's tzjavascript and tzpython # March 25, 2012 bar electro_shock_all_clients() # March 27, 2012 bar forget_old_clients() # March 28, 2012 bar macro expand the stuff that's pushed to the browser # May 5, 2012 bar send_hit_path() subroutine # magic mime type in file # byte ranges on macroed files # May 7, 2012 bar get the default language dir from the macro processor # May 8, 2012 bar allow caller to spec the empty file name (index.htm) # May 27, 2012 bar doxygen namespace # March 26, 2013 bar unused MAX_VIDEO_RANGE_LEN # August 20, 2013 bar in case the macros come out with unicode, convert them back to utf8 for shoving to the clients # November 7, 2017 bar maxint->maxsize # March 5, 2023 bar future print # --eodstamps-- ## \file # \namespace tzpython.tz_multi_client_web_server # # # This is a web server that services mulitple clients, all of whom can control the main program # and all of whom, presumably, want to see the same thing. # # It uses the tz_web_server.py logic's 'ci' (