diff options
author | Bruce A. Mah <bmah@kitchenlab.org> | 2017-05-30 14:15:28 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-30 14:15:28 -0700 |
commit | c458a115b7cbe057c8507a3f37702cf70ea10563 (patch) | |
tree | 6e51c3b647301e25ce21d30abe198138785cc791 /src/iperf_udp.c | |
parent | acb4c4c9d59c080987f4a36e5277bdba646ea35d (diff) | |
download | iperf3-c458a115b7cbe057c8507a3f37702cf70ea10563.tar.gz |
Fix -F problems (#588)
Attempt to fix some brokenness in -F from #301.
In some work related to #125, we introduced a bug in which
chunks of a file being read for the -F option were not
completely sent, particularly with TCP sockets. We attempt
to fix this by detecting cases in which not all data passed
to a socket could be actually sent (for example due to full
socket buffers) and preserving that data for future send
iterations.
The ending statistics in the "diskfile" JSON structure were
wrong, and did not properly distinguish between sender-side
and receiver-side statistics. This has been fixed (at least
for the client side).
Specifically mention in the manpage that "iperf -F" is not
a file transfer tool.
Diffstat (limited to 'src/iperf_udp.c')
-rw-r--r-- | src/iperf_udp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/iperf_udp.c b/src/iperf_udp.c index e006b09..70b62a2 100644 --- a/src/iperf_udp.c +++ b/src/iperf_udp.c @@ -187,6 +187,9 @@ iperf_udp_send(struct iperf_stream *sp) sp->result->bytes_sent += r; sp->result->bytes_sent_this_interval += r; + if (sp->test->debug) + printf("sent %d bytes of %d, total %lu\n", r, sp->settings->blksize, sp->result->bytes_sent); + return r; } |