Output & verify TCP_CONGESTION
A means to measure network responsiveness and throughput
Brought to you by:
rjmcmahon
Use getsockopt on TCP CCA so user knows what's being used
if (isCongestionControl(inSettings)) {
#ifdef TCP_CONGESTION
Socklen_t len = strlen(inSettings->mCongestion) + 1;
int rc = setsockopt(inSettings->mSock, IPPROTO_TCP, TCP_CONGESTION,
inSettings->mCongestion, len);
if (rc == SOCKET_ERROR) {
fprintf(stderr, "Attempt to set '%s' congestion control failed: %s\n",
inSettings->mCongestion, strerror(errno));
unsetCongestionControl(inSettings);
}
#else
fprintf(stderr, "The -Z option is not available on this operating system\n");
#endif
}
Code commit is here. Master only.