HttpTransmitFile


int HttpTransmitFile ( HttpConnection hConn , const char *pFilePath )




 
Used in request callback for returning a other file than the request url

 
hConn pointer to the connection data
 
pFilePath is the new file path
 
Returns 0 for the default response.
 

 

i.e.:

    int RequestCallback(HttpConnection hConn,int iCommand,const char *pHost,const char *pUrl,const char *pParams,int iUrlLen,int iParamLen)
    {
        ...

        if(IsNotMyUrl(pUrl))
            {
            return 0;
            }

        ...

    return HttpTransmitFile(hConn,"D:\\Http\\index.html"); 
    } 

 

see also:

AzHttp Overview | HttpDaemon | HttpStopDaemon | HttpTransmitCallback | HttpTransmitGoto | HttpTransmitMemory