Netscape ENTERPRISE SERVER 6.0 - NSAPI PROGRAMMER GUIDE Manual page 236

Nsapi
Table of Contents

Advertisement

Quality of Service Examples
if ((srv_bwlim) && (srv_bw>srv_bwlim))
{
/* bandwidth limit was exceeded, log it */
ereport(LOG_FAILURE, "Global bandwidth limit of %d exceeded.
Current global bandwidth : %d", &srv_bwlim, srv_bw);
if (srv_bw_ef)
{
/* and enforce it */
ok = PR_FALSE;
};
};
if ((srv_connlim) && (srv_conn>srv_connlim))
{
/* connection limit was exceeded, log it */
ereport(LOG_FAILURE, "Global connection limit of %d exceeded.
Current global connections : %d", &srv_connlim, srv_conn);
if (srv_conn_ef)
{
/* and enforce it */
ok = PR_FALSE;
};
};
if (ok)
{
return REQ_PROCEED;
}
else
{
/* one of the limits was exceeded
therefore, we set HTTP error 503 "server too busy" */
protocol_status(sn, rq, PROTOCOL_SERVICE_UNAVAILABLE, NULL);
return REQ_ABORTED;
};
}
236
Netscape Enterprise Server NSAPI Programmer's Guide • November 2001

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enterprise server 6.0

Table of Contents