Installation guide
Using the Load Balancing Plug-in: libresonate
64 iPlanet Web Server, Enterprise Edition Release Notes • June 20, 2001
<Object ppath="/usr/netscape/ent41/docs/.perf" 2=">">
Service fn="service-dump"
</Object>
Below is a sample dosleep.c:
#ifdef XP_WIN32
#define NSAPI_PUBLIC __declspec(dllexport)
#else /* !XP_WIN32 */
#define NSAPI_PUBLIC
#endif /* !XP_WIN32 */
#include "nsapi.h"
#define BUFFER_SIZE 1024
#ifdef __cplusplus
extern "C"
#endif
NSAPI_PUBLIC int dosleep(pblock *pb, Session *sn, Request *rq)
{
char buf[BUFFER_SIZE];
int length, duration;
char *dur = pblock_findval("duration", pb);
if (!dur) {
log_error(LOG_WARN, "dosleep", sn, rq, "Value for duration is not set.");
return REQ_ABORTED;
}
duration = atoi(dur);
/* We need to get rid of the internal content type. */
param_free(pblock_remove("content-type", rq->srvhdrs));
pblock_nvinsert("content-type", "text/html", rq->srvhdrs);
protocol_status(sn, rq, PROTOCOL_OK, NULL);
/* get ready to send page */
protocol_start_response(sn, rq);
/* fill the buffer with our message */
length = util_snprintf(buf, BUFFER_SIZE, "<title>%s</title><h1>%s</h1>\n",
"Sleeping", "Sleeping");
length += util_snprintf(&buf[length], BUFFER_SIZE - length, "Sample NSAPI that
is sleeping for %d seconds...\n", duration);