/* Note: you cannot verify TCP window shift, since it returns
* a structure and not the same integer we use to set it. (ugh) */
} #endif/* TCP_WINSHIFT */
#ifdef TCP_RFC1323 /* On AIX, RFC 1323 extensions can be set system-wide, *usingthe'no'networkoptionscommand.Butwecanalsosetthem
* per-socket, so let's try just in case. */ if ( inTCPWin > 65535 ) { /* enable RFC 1323 */ int on = 1;
rc = setsockopt( inSock, IPPROTO_TCP, TCP_RFC1323,
(char*) &on, sizeof( on )); if ( rc < 0 ) { return rc;
}
} #endif/* TCP_RFC1323 */
if ( !inSend ) { /* receive buffer -- set *note:resultsareverifiedafterconnect()orlisten(),
* since some OS's don't show the corrected value until then. */
newTCPWin = inTCPWin;
rc = setsockopt( inSock, SOL_SOCKET, SO_RCVBUF,
(char*) &newTCPWin, sizeof( newTCPWin ));
} else { /* send buffer -- set *note:resultsareverifiedafterconnect()orlisten(),
* since some OS's don't show the corrected value until then. */
newTCPWin = inTCPWin;
rc = setsockopt( inSock, SOL_SOCKET, SO_SNDBUF,
(char*) &newTCPWin, sizeof( newTCPWin ));
} if ( rc < 0 ) { return rc;
}
} #endif/* SO_SNDBUF */
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.