Commit dee36a89 authored by Taddeus Kroes's avatar Taddeus Kroes

Improved server start(), run() methods.

parent d715a373
...@@ -78,3 +78,6 @@ class GestureServer(TuioServerHandler, Logger): ...@@ -78,3 +78,6 @@ class GestureServer(TuioServerHandler, Logger):
def stop(self): def stop(self):
self.tuio_server.stop() self.tuio_server.stop()
def run(self):
self.tuio_server.run()
...@@ -62,12 +62,12 @@ class TuioServer2D(Logger): ...@@ -62,12 +62,12 @@ class TuioServer2D(Logger):
self.down.add(sid) self.down.add(sid)
self.handler_obj.on_point_down(sid, x, y) self.handler_obj.on_point_down(sid, x, y)
def run(self):
self.server.handle_request()
def start(self): def start(self):
try: self.info('Starting OSC server')
self.info('Starting OSC server') self.server.serve_forever()
self.server.serve_forever()
except SystemExit:
self.stop()
def stop(self): def stop(self):
self.info('Stopping OSC server') self.info('Stopping OSC server')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment