MCPcopy Create free account
hub / github.com/apache/trafficserver / parse_args

Function parse_args

tests/gold_tests/tls/split_client_hello.py:150–165  ·  view source on GitHub ↗

Parse command line arguments. :return: The parsed arguments.

()

Source from the content-addressed store, hash-verified

148
149
150def parse_args() -> argparse.Namespace:
151 '''Parse command line arguments.
152 :return: The parsed arguments.
153 '''
154 parser = argparse.ArgumentParser(description=__doc__)
155 parser.add_argument("dest_host", help="Destination host to which to send the CLIENT_HELLO.")
156 parser.add_argument('dest_port', type=int, help="Destination port to which to send the CLIENT_HELLO.")
157 parser.add_argument(
158 '--split_size',
159 '-s',
160 type=int,
161 default=1100,
162 help="Size of each split packet. Default is 1100 bytes. "
163 "0 means no split, send the whole packet at once.")
164 parser.add_argument('--num_data_packets', '-d', type=int, default=2, help="Number of data packets to send. Default is 2.")
165 return parser.parse_args()
166
167
168def main() -> int:

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected