Commit d86512a4 authored by Alexandre's avatar Alexandre
Browse files

[DoH] Remove --sync option for multistreams

parent 6d4db045
......@@ -102,7 +102,6 @@ with `-v` to keep only part of the output
* `-P, --post, --POST` : use HTTP POST method for all the transfers
* `-e, --head, --HEAD` : use HTTP HEAD method for all the transfers
* `--multistreams` : use HTTP/2 streams, needs an input file with `-f`
* `--sync` : process received queries synchronously (only with --multistreams)
* `--time` : display the time elapsed for the query (only with --multistreams)
#### DoT only options
......@@ -235,10 +234,7 @@ the multi interface, see the branch [homer-perf](-/tree/homer-perf).
As soon as a a response is received, it is displayed with the HTTP
return code and the elapsed time for this specific query. This output
can be suppressed with `--no-display-results`. It is possible to delay
the output of the answers after the last transfer finishes with `--sync`.
In that case the DNS responses are displayed in the same order as they
were sent.
can be suppressed with `--no-display-results`.
It is also possible to focus on the elapsed time only with the use
of the `--time` option combined with `--no-display-results`. This shows
......
......@@ -62,7 +62,6 @@ class opts:
pipelining = False
max_in_flight = 20
multistreams = False
sync = False
display_results = True
show_time = False
check = False
......@@ -145,8 +144,6 @@ def usage(msg=None):
-P --post --POST Use HTTP POST method for all the transfers
-e --head --HEAD Use HTTP HEAD method for all the transfers
--multistreams Use HTTP/2 streams, needs an input file with -f
--sync Process received queries synchronously (only with
--multistreams)
--time Display the time elapsed for the query (only with
--multistreams)
......@@ -771,16 +768,14 @@ class ConnectionDoH(Connection):
continue
while 1:
ret, num_handles = self.multi.perform()
if not opts.sync:
n, handle_pass, handle_fail = self.multi.info_read()
for handle in handle_pass:
self.read_result_handle(handle, silent=silent)
n, handle_pass, handle_fail = self.multi.info_read()
for handle in handle_pass:
self.read_result_handle(handle, silent=silent)
if ret != pycurl.E_CALL_MULTI_PERFORM:
break
if not opts.sync:
n, handle_pass, handle_fail = self.multi.info_read()
for handle in handle_pass:
self.read_result_handle(handle, silent=silent)
n, handle_pass, handle_fail = self.multi.info_read()
for handle in handle_pass:
self.read_result_handle(handle, silent=silent)
def send(self, handle):
handle.buffer = io.BytesIO()
......@@ -1099,7 +1094,7 @@ def parse_opts(opts):
"insecure", "vhost=", "multistreams",
"pipelining", "max-in-flight=", "key=",
"dnssec", "noedns", "ecs", "nosni",
"sync", "no-display-results", "time",
"no-display-results", "time",
"file=", "repeat=", "delay=",
"v4only", "v6only",
"check", "mandatory-level="])
......@@ -1124,8 +1119,6 @@ def parse_opts(opts):
opts.insecure = True
elif option == "--multistreams":
opts.multistreams = True
elif option == "--sync":
opts.sync = True
elif option == "--no-display-results":
opts.display_results = False
elif option == "--time":
......@@ -1168,8 +1161,6 @@ def parse_opts(opts):
elif option == "--check":
opts.check = True
opts.display_results = False
elif option == "--no-display-results":
opts.display_results = False
elif option == "--mandatory-level":
opts.mandatory_level = value
else:
......@@ -1203,9 +1194,6 @@ def parse_opts(opts):
if opts.multistreams and opts.ifile is None:
error("Multi-streams requires an input file")
sys.exit(1)
if opts.sync and not opts.multistreams:
error("--sync cannot be used without --multistreams")
sys.exit(1)
if opts.show_time and opts.dot:
error("--time cannot be used with --dot")
sys.exit(1)
......@@ -1342,8 +1330,6 @@ def run_default(name, connection, opts):
connection.pipelining_add_request(request)
if opts.multistreams:
connection.perform_multi()
if opts.sync:
connection.read_results()
if opts.dot and opts.pipelining:
print("")
done = 0
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment