HttpTransmitCallback


int HttpTransmitCallback ( HttpConnection hConn , HttpDataCB pCallback )



 
Used in a request callback for returning a data via a own data callback.
See here for the depentencies of the callbacks.

 
hConn pointer to the connection data
 
pCallback is the data callback function for transmiting data to the client browser.
int Callabck(HttpConnection hConn,char *pBuffer,int iSize,int iOffset) 
this callback returns the count of returned byte, or 0 at the end of the stream.
a return value below zero stops the stream and the server returns an error.  

 

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)
    {
        ...

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

        ...

    return HttpTransmitCallback(hConn,DataCallback); 
    } 


 

see also:

AzHttp Overview | HttpDaemon | HttpStopDaemon | HttpTransmitFile | HttpTransmitGoto | HttpTransmitMemory