From 7fe9f8e0926d9b7cf2249da81eb6881bd42bcb97 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Tue, 16 Jul 2019 02:31:56 +0530 Subject: [PATCH] signalling/simple-server: Listen on both ipv4 and ipv6 by default Empty string or `None` mean all interfaces. Specifying 0.0.0.0 means ipv4 interfaces only. Fixes https://github.com/centricular/gstwebrtc-demos/issues/120 --- webrtc/signalling/simple-server.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webrtc/signalling/simple-server.py b/webrtc/signalling/simple-server.py index df83c768fd..e46f748550 100755 --- a/webrtc/signalling/simple-server.py +++ b/webrtc/signalling/simple-server.py @@ -18,7 +18,8 @@ import argparse from concurrent.futures._base import TimeoutError parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) -parser.add_argument('--addr', default='0.0.0.0', help='Address to listen on') +# See: host, port in https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.create_server +parser.add_argument('--addr', default='', help='Address to listen on (default: all interfaces, both ipv4 and ipv6)') parser.add_argument('--port', default=8443, type=int, help='Port to listen on') parser.add_argument('--keepalive-timeout', dest='keepalive_timeout', default=30, type=int, help='Timeout for keepalive (in seconds)') parser.add_argument('--cert-path', default=os.path.dirname(__file__))