changes to run configuration and virtual command model
This commit is contained in:
@@ -21,17 +21,17 @@ class WebSocketBase:
|
||||
self.flask_app_context = app
|
||||
self.socket_thread = None
|
||||
|
||||
def start_websocket_in_thread(self, host=None, port=None, debug=None):
|
||||
def start_websocket_in_thread(self, host=None, port=None, debug=None, **kwargs):
|
||||
self.socket_thread = threading.Thread(
|
||||
target=self.start_websocket,
|
||||
args=(host, port, debug))
|
||||
args=(host, port, debug, kwargs))
|
||||
self.socket_thread.start()
|
||||
return self.socket_thread
|
||||
|
||||
def start_websocket(self, host=None, port=None, debug=None):
|
||||
def start_websocket(self, host=None, port=None, debug=None, **kwargs):
|
||||
if debug is None:
|
||||
debug = self.flask_app_context.debug
|
||||
socketio.run(self.flask_app_context, host=host, port=port, debug=debug)
|
||||
socketio.run(self.flask_app_context, host=host, port=port, debug=debug, **kwargs)
|
||||
|
||||
def send_test_msg(self):
|
||||
socketio.emit('test', "tolle nachricht")
|
||||
|
||||
Reference in New Issue
Block a user