Netscape ENTERPRISE SERVER 6.0 - NSAPI PROGRAMMER GUIDE Manual page 233

Nsapi
Table of Contents

Advertisement

ours = PR_TRUE;
sprintf(error, "<P>Global bandwidth limit of %d . Current
bandwidth : %d . <P>", &srv_bwlim, srv_bw);
};
if ((srv_connlim) && (srv_conn>srv_connlim))
{
/* SERVER connection limit was exceeded, display it */
ours = PR_TRUE;
sprintf(error, "<P>Global connection limit of %d . Current
connections : %d . <P>", &srv_connlim, srv_conn);
};
if (ours)
{
/* this was really a QOS failure, therefore send the error
page */
pblock_nvreplace("content-type", "text/html", rq->srvhdrs);
protocol_start_response(sn, rq);
net_write(sn->csd, error, strlen(error));
return REQ_PROCEED;
}
else
{
/* this 503 didn't come from a QOS SAF failure, let someone
else handle it */
return REQ_PROCEED;
};
}
/*-----------------------------------------------------------------------------
qos_handler
This is an NSAPI AuthTrans function
It examines the QOS values in the request and compare them to the QOS limits.
It does several things :
1) It will log errors if the QOS limits are exceeded.
2) It will return REQ_ABORTED with a 503 error code if the QOS limits are
exceeded,
and the QOS limits are set to be enforced. Otherwise it will return REQ_PROCEED
-----------------------------------------------------------------------------*/
NSAPI_PUBLIC int qos_handler(pblock *pb, Session *sn, Request *rq)
Quality of Service Examples
Chapter 6
Examples of Custom SAFs
233

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enterprise server 6.0

Table of Contents