iperf icon indicating copy to clipboard operation
iperf copied to clipboard

The difference between read() in client and Nread() in serve

Open Sunyifan-123 opened this issue 6 months ago • 1 comments

In iperf3 v3.17.1, the iperf_handle_message_server function uses Nread() to check test->ctrl_sck, while iperf_handle_message_client uses read() to check test->ctrl_sck. Why is this read() and not Nread()?

Sunyifan-123 avatar Jun 12 '25 03:06 Sunyifan-123

I believe that this is only because of historical reasons and that the client should also use Nread() (this is also hinted by the comment preceding the read()). In addition, as part of the changes in PR #1843 I changed the read() to Nread() and it seemed to work with no problems.

davidBar-On avatar Jun 13 '25 20:06 davidBar-On