HttpTransmitMemory


int HttpTransmitMemory ( HttpConnection hConn , const void *pMemory , int iSize )




 
Used in request callback for returning a memory block

 
hConn pointer to the connection data
 
pMemory is the pointer to the memory
 
iSize is the size of the memory
 
Returns 1 for a callback response
 
 

i.e.:

    int RequestCallback(HttpConnection hConn,int iCommand,const char *pHost,const char *pUrl,const char *pParams,int iUrlLen,int iParamLen)
    {
    static char aHtml[]="<html><body> \n hello \n </body></html>";

        ...

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

        ...

    return HttpTransmitMemory(hConn,aHtml,sizeof(aHtml)); 
    } 


 

see also:

AzHttp Overview | HttpDaemon | HttpStopDaemon | HttpTransmitCallback | HttpTransmitFile | HttpTransmitGoto