asyncio.get_event_loop().run_forever()\r
\r
def start_server():\r
- #STATE["current"] = current_slide()\r
http_daemon = threading.Thread(name="http_daemon", target=run_http)\r
http_daemon.setDaemon(True)\r
http_daemon.start()\r
print("Started HTTP server")\r
-\r
- #run_ws()\r
\r
ws_daemon = threading.Thread(name="ws_daemon", target=run_ws)\r
ws_daemon.setDaemon(True)\r
ws_daemon.start()\r
print("Started websocket server")\r
\r
- #try:\r
- # ws_daemon.start()\r
- # http_daemon.start()\r
- #except (KeyboardInterrupt, SystemExit):\r
- # cleanup_stop_thread()\r
- # sys.exit()\r
-\r
class Slideshow:\r
def __init__(self, instance):\r
self.instance = instance\r