- tsock = &scm->test_socket[i];
- if (!((tsock->stats.stop.tv_sec == 0) &&
- (tsock->stats.stop.tv_nsec == 0)))
- continue;
-
- if (FD_ISSET (vppcom_session_index (tsock->fd), wfdset)
- && (tsock->stats.tx_bytes < ctrl->cfg.total_bytes))
-
- {
- tx_bytes = vcl_test_write (tsock->fd, (uint8_t *) tsock->txbuf,
- nbytes, &tsock->stats,
- ctrl->cfg.verbose);
- if (tx_bytes < 0)
- {
- fprintf (stderr, "\nCLIENT: ERROR: vcl_test_write(%d) "
- "failed -- aborting test!\n", tsock->fd);
- return;
- }
-
- }
-
- if ((FD_ISSET (vppcom_session_index (tsock->fd), rfdset)) &&
- (tsock->stats.rx_bytes < ctrl->cfg.total_bytes))
- {
- rx_bytes = vcl_test_read (tsock->fd, (uint8_t *) tsock->rxbuf,
- nbytes, &tsock->stats);
- if (rx_bytes > 0)
- {
- printf ("CLIENT (fd %d): RX (%d bytes) - '%s'\n",
- tsock->fd, rx_bytes, tsock->rxbuf);
-
- if (tsock->stats.rx_bytes != tsock->stats.tx_bytes)
- printf ("CLIENT: WARNING: bytes read (%lu) "
- "!= bytes written (%lu)!\n",
- tsock->stats.rx_bytes, tsock->stats.tx_bytes);
- }
- }
-
- if (tsock->stats.rx_bytes >= ctrl->cfg.total_bytes)
- {
- clock_gettime (CLOCK_REALTIME, &tsock->stats.stop);
- n--;
- }