HP WebQoS Software manual Sample Session Class Program

Page 34

Sample Programs, Configuration, and Header Files

Sample Session Class Program

Sample Session Class Program

#include <webqosapi.h>

NSAPI_PUBLIC int WQClassExample(pblock *pb, Session *sn, Request *rq)

{

int retval = 0; int socketid; int errorcode = 0; uint32_t userClass;

/* Other business logic */

<code>

/* Time to show WebQoS Session Class example */

memcpy(&socketid, sn->csd, sizeof(int)); userClass = WQ_UCLASS_HIGH;

retval = wq_set_session_cls(socketid, userClass, &errorcode); if (!retval)

{

/* Verify the Session Class setting */

retval = wq_get_session_cls(socketid, &errorcode);

if (retval != WQ_UCLASS_HIGH)

printf(“ wq_set_session_cls: Error %d”, errorcode);

else

printf(“ wq_set_session_cls: Success “);

}

}

34

Appendix A

Image 34
Contents HP WebQoS on HP-UX API Programmer’s Guide Legal Notices Page Page Contents Troubleshooting Printing History Page About the WebQoS API Example Subsequent Service Requests Example Initial Service RequestOverview Example Setting the Process Group WebQoSOverview Using the WebQoS API Using the WebQoS API Wqgetsessioncls Error Code Description Return ValueWqsetsessioncls Cls Values Class of Request Cls Value Classification RuleExample Condition or Process Group Return ValueMultithreaded Applications Wqsetproccls Class Values Process GroupUsing the WebQoS API wqsetproccls Troubleshooting Checklist Select the Classification Rules tabRequest Classification Rule Class Error Codes Request Classification Rule Class Error Codes Process Group Error Codes Process Group Error Codes Error Code Wqerrother Error Code WqerrpermissionProcess Group Error Codes Sample Programs, Configuration, and Header Files Sample Session Class Program Sample Process Group Program Sample Process Group Program Svccls.allow Configuration File Webqosapi.h Header File Webqosapi.h Header File Webqosapi.h Header File Index Index Index
Related manuals
Manual 182 pages 33.13 Kb Manual 150 pages 36.15 Kb