|
@@ -14,9 +14,13 @@ if __name__ == '__main__':
|
|
|
parser = argparse.ArgumentParser(description='Test the network throughput (optionally through a proxy).')
|
|
|
parser.add_argument('port', type=int, help='listen on port')
|
|
|
parser.add_argument('--no-accel', action='store_true', help='don\'t use C acceleration (use pure Python)')
|
|
|
+ parser.add_argument('--localhost', action='store_true', help='bind to 127.0.0.1 instead of 0.0.0.0')
|
|
|
args = parser.parse_args()
|
|
|
#
|
|
|
- endpoint = ('127.0.0.1', args.port)
|
|
|
+ if args.localhost:
|
|
|
+ endpoint = ('127.0.0.1', args.port)
|
|
|
+ else:
|
|
|
+ endpoint = ('0.0.0.0', args.port)
|
|
|
#
|
|
|
processes = []
|
|
|
processes_map = {}
|