зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1279259 - make TURN server port configurable, r=jmaher.
This commit is contained in:
Родитель
86ad9dd370
Коммит
d08efadb1f
|
@ -588,6 +588,11 @@ class MochitestArguments(ArgumentContainer):
|
|||
"help": "Delete pending crash reports before running tests.",
|
||||
"suppress": True,
|
||||
}],
|
||||
[["--websocket-process-bridge-port"],
|
||||
{"default": "8191",
|
||||
"dest": "websocket_process_bridge_port",
|
||||
"help": "Port for websocket/process bridge. Default 8191.",
|
||||
}],
|
||||
]
|
||||
|
||||
defaults = {
|
||||
|
|
|
@ -1091,7 +1091,9 @@ class MochitestDesktop(object):
|
|||
|
||||
command = [sys.executable,
|
||||
os.path.join("websocketprocessbridge",
|
||||
"websocketprocessbridge.py")]
|
||||
"websocketprocessbridge.py"),
|
||||
"--port",
|
||||
options.websocket_process_bridge_port]
|
||||
self.websocketProcessBridge = mozprocess.ProcessHandler(command,
|
||||
cwd=SCRIPT_DIR)
|
||||
self.websocketProcessBridge.run()
|
||||
|
|
|
@ -8,6 +8,7 @@ from twisted.internet.task import LoopingCall
|
|||
import txws
|
||||
import psutil
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
import os
|
||||
|
||||
|
@ -89,12 +90,17 @@ def check_parent():
|
|||
reactor.stop()
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(description='Starts websocket/process bridge.')
|
||||
parser.add_argument("--port", type=str, dest="port", default="8191",
|
||||
help="Port for websocket/process bridge. Default 8191.")
|
||||
args = parser.parse_args()
|
||||
|
||||
parent_checker = LoopingCall(check_parent)
|
||||
parent_checker.start(1)
|
||||
|
||||
bridgeFactory = ProcessSocketBridgeFactory()
|
||||
reactor.listenTCP(8191, txws.WebSocketFactory(bridgeFactory))
|
||||
print("websocket/process bridge listening on port 8191")
|
||||
reactor.listenTCP(int(args.port), txws.WebSocketFactory(bridgeFactory))
|
||||
print("websocket/process bridge listening on port %s" % args.port)
|
||||
reactor.run()
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче