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,
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 |