MCPcopy Create free account
hub / github.com/esnet/iperf / iperf_client_end

Function iperf_client_end

src/iperf_client_api.c:553–584  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

551
552
553int
554iperf_client_end(struct iperf_test *test)
555{
556 if (NULL == test)
557 {
558 iperf_err(NULL, "No test\n");
559 return -1;
560 }
561 struct iperf_stream *sp;
562
563 /* Close all stream sockets */
564 SLIST_FOREACH(sp, &test->streams, streams) {
565 close(sp->socket);
566 }
567
568 /* show final summary */
569 test->reporter_callback(test);
570
571 /* Send response only if no error in server */
572 if (test->state > 0) {
573 if (iperf_set_send_state(test, IPERF_DONE) != 0)
574 return -1;
575 }
576
577 /* Close control socket */
578 if (test->ctrl_sck >= 0) {
579 // Make sure all control messages are received by the server before the socket is closed
580 iperf_sync_close_socket(test->ctrl_sck);
581 }
582
583 return 0;
584}
585
586
587int

Callers 2

iperf_run_clientFunction · 0.85

Calls 3

iperf_errFunction · 0.85
iperf_set_send_stateFunction · 0.85
iperf_sync_close_socketFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…