From 44d80b3a434e9872bd2b3e5935155b82b0d9c107 Mon Sep 17 00:00:00 2001 From: Sid1057 Date: Tue, 11 May 2021 08:24:27 +0300 Subject: [PATCH] Add the host argument to the XVIZServer constructor in python --- python/xviz_avs/server/server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/xviz_avs/server/server.py b/python/xviz_avs/server/server.py index fceb18517..66613991f 100644 --- a/python/xviz_avs/server/server.py +++ b/python/xviz_avs/server/server.py @@ -6,7 +6,7 @@ import traceback class XVIZServer: - def __init__(self, handlers, port=3000, per_message_deflate=True): + def __init__(self, handlers, port=3000, per_message_deflate=True, host="localhost"): ''' :param handlers: single or list of handlers that acts as function and return a session object, or None if not supported ''' @@ -22,7 +22,7 @@ def __init__(self, handlers, port=3000, per_message_deflate=True): compression = "deflate" if per_message_deflate else None self._serve_options = dict(ws_handler=self.handle_session, - host="localhost", port=port, compression=compression) + host=host, port=port, compression=compression) async def handle_session(self, socket, request): '''