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

Function parse_args

tests/gold_tests/slow_post/quick_server.py:27–35  ·  view source on GitHub ↗

Parse command line arguments.

()

Source from the content-addressed store, hash-verified

25
26
27def parse_args() -> argparse.Namespace:
28 """Parse command line arguments."""
29 parser = argparse.ArgumentParser(description=__doc__)
30 parser.add_argument("address", help="Address to listen on")
31 parser.add_argument("port", type=int, default=8080, help="The port to listen on")
32 parser.add_argument('--drain-request', action='store_true', help="Drain the entire request before closing the connection")
33 parser.add_argument(
34 '--abort-response-headers', action='store_true', help="Abort the response in the midst of sending the response headers")
35 return parser.parse_args()
36
37
38def get_listening_socket(address: str, port: int) -> socket.socket:

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected