[ Previous ] [ Contents ] [ Index ] [ Next ]



Return the parameters of a request


    typedef void *Ns_OpContext;
    typedef int (Ns_OpProc) (void *context, Ns_Conn *conn);
    typedef void (Ns_OpDeleteProc) (void *context);
    void Ns_GetRequest(
    char *hServer
    char *method,
    char *URL,
    Ns_OpProc **pProc,
    Ns_OpDeleteProc **pDeleteProc,
    Ns_OpContext **pContext
    int *pflags


The Ns_GetRequest function sets pproc to the procedure the server would call to handle a request of method and URL on the specified server. pContext is set to the context that would be passed to pProc when called, and pDeletepProc is set to the delete procedure that would be called if pProc were unregistered (or re-registered). pflags points to the flags argument passed to Ns_RegisterRequest. The function returned is the best matching function and not necessarily an exact matching function.

You can use Ns_GetRequest and the NS_OP_NODELETE flag for Ns_RegisterRequest to implement wrapper-type operation, where you save the operation function, delete procedure, and context and register a new function that does some type of pre-processing before calling the operation or delete procedures.

Top of Page

[ Previous ] [ Contents ] [ Index ] [ Next ]
Copyright © 1998-99 America Online, Inc.