aboutsummaryrefslogtreecommitdiff
path: root/src/iperf_locale.c
diff options
context:
space:
mode:
authorBruce A. Mah <bmah@kitchenlab.org>2017-05-17 12:50:50 -0700
committerGitHub <noreply@github.com>2017-05-17 12:50:50 -0700
commit9d7d60aca1c946547c88042a302a434d10d580ed (patch)
treeb5868160e7f050121040d438561ff6ba1fd96e6b /src/iperf_locale.c
parentf1415a0d98bb6737329bb4091d3289d9b341bd72 (diff)
downloadiperf3-9d7d60aca1c946547c88042a302a434d10d580ed.tar.gz
Issue 216 (#581)
* Add configurable timeout for the setup of the control connection. This is specified using the new --connect-timeout option, with an integer parameter in ms. The iperf3 client will wait for this amount of time for the setup of the control connection to the server. If this option is not given, the OS default for TCP connection setup is used. Specifying a smaller connection timeout allows faster detection of a down / unresponsive iperf3 server. The implementation uses a variation on the timeout_connect() function from OpenBSD's netcat utility. Fixes #216.
Diffstat (limited to 'src/iperf_locale.c')
-rw-r--r--src/iperf_locale.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/iperf_locale.c b/src/iperf_locale.c
index d90a6df..9d65a55 100644
--- a/src/iperf_locale.c
+++ b/src/iperf_locale.c
@@ -131,6 +131,7 @@ const char usage_longstr[] = "Usage: iperf3 [-s|-c host] [options]\n"
" --nstreams # number of SCTP streams\n"
#endif /* HAVE_SCTP */
" -u, --udp use UDP rather than TCP\n"
+ " --connect-timeout # timeout for control connection setup (ms)\n"
" -b, --bandwidth #[KMG][/#] target bandwidth in bits/sec (0 for unlimited)\n"
" (default %d Mbit/sec for UDP, unlimited for TCP)\n"
" (optional slash and packet count for burst mode)\n"