|
|
@ -143,7 +143,7 @@ def start_server(address, port, heartbeat_interval, heartbeat_timeout): |
|
|
|
# heartbeat(sio, heartbeat_interval, heartbeat_timeout) |
|
|
|
# ) |
|
|
|
# aiohttp_app = loop.create_task(web._run_app(app, host=address, port=port)) |
|
|
|
|
|
|
|
|
|
|
|
# Python 3.6+ compatible. Supports any awaitable: |
|
|
|
heartbeat_task = asyncio.ensure_future( |
|
|
|
heartbeat(sio, heartbeat_interval, heartbeat_timeout) |
|
|
@ -166,10 +166,8 @@ def start_server(address, port, heartbeat_interval, heartbeat_timeout): |
|
|
|
|
|
|
|
if __name__ == "__main__": |
|
|
|
parser = argparse.ArgumentParser(description="Start announce_server client.") |
|
|
|
|
|
|
|
parser.add_argument( |
|
|
|
"--ip", default="0.0.0.0", help="IP address of the host server" |
|
|
|
) |
|
|
|
|
|
|
|
parser.add_argument("--ip", default="0.0.0.0", help="IP address of the host server") |
|
|
|
parser.add_argument( |
|
|
|
"--port", default=4999, type=int, help="Port of the host server" |
|
|
|
) |
|
|
@ -185,7 +183,7 @@ if __name__ == "__main__": |
|
|
|
type=float, |
|
|
|
help="Heartbeat timeout in seconds", |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
args = parser.parse_args() |
|
|
|
|
|
|
|
start_server( |
|
|
|