Initial integration of behem0th.
This commit is contained in:
parent
5188457be5
commit
7f067f40e9
4 changed files with 31 additions and 3 deletions
|
@ -18,6 +18,8 @@ from ws4py.server.wsgiutils import WebSocketWSGIApplication
|
|||
|
||||
from Highway import Server, Route, DummyPipe
|
||||
|
||||
import behem0th
|
||||
|
||||
|
||||
class Info(Route):
|
||||
def run(self, data, handler):
|
||||
|
@ -245,10 +247,15 @@ server.set_app(WebSocketWSGIApplication(handler_cls=Handler,
|
|||
"reboot" : DummyPipe()}}))
|
||||
|
||||
|
||||
sync_client = behem0th.Client(verbose_log=True)
|
||||
|
||||
|
||||
try:
|
||||
Logging.header("Server loop starting.")
|
||||
sync_client.listen()
|
||||
server.serve_forever()
|
||||
except KeyboardInterrupt:
|
||||
Logging.header("Gracefully shutting down server.")
|
||||
server.server_close()
|
||||
sync_client.close()
|
||||
Logging.success("Server shutdown successful.")
|
||||
|
|
Reference in a new issue