Skip to content

Commit

Permalink
add dtn options
Browse files Browse the repository at this point in the history
  • Loading branch information
kota-yata committed Jul 20, 2024
1 parent 9bc1e43 commit 2e0d7da
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions examples/http3_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import os
import pickle
import ssl
import sys
import time
from collections import deque
from typing import BinaryIO, Callable, Deque, Dict, List, Optional, Union, cast
Expand Down Expand Up @@ -538,6 +539,12 @@ async def main(
parser.add_argument(
"--zero-rtt", action="store_true", help="try to send requests using 0-RTT"
)
parser.add_argument(
"--dtn",
type=bool,
default=False,
help="enable DTN mode",
)

args = parser.parse_args()

Expand Down Expand Up @@ -585,6 +592,10 @@ async def main(
except FileNotFoundError:
pass

if args.dtn:
configuration.idle_timeout = 1000000
configuration.initial_rtt = 1000000

# load SSL certificate and key
if args.certificate is not None:
configuration.load_cert_chain(args.certificate, args.private_key)
Expand Down

0 comments on commit 2e0d7da

Please sign in to comment.