int HttpRegisterScript ( HttpConfigData *pConfig , HttpScriptCB pCbScript , const char *pSuffix )
pConfig | config data of the server |
pCbScript | callback for tag data |
pSuffix | is the suffix of the script files.
(0 means ".htmx") |
1 = no more user parameters
2 = suffix is to long
The script plugin loads a html file and replaces all tags with data from a
callback.
A tag has the format:
The callback funktion for the tag data has this syntax:
typedef int (_cdecl *HttpScriptCB)(HttpConnection hConn,char *pBuffer,int iSize,const char *pTag)
hConn |
pointer to the connection data |
|
pBuffer |
|
|
iSize | is the
size of the
|
|
pTag | is the
name of the tag |
Returns the count of data bytes or -1 to stop the transmission.
If the HTTP_SCRIPT_RECALL flag is set the the tag will be called again (for lage data blocks).
see also:
AzHttp Overview |
HttpInitScript |
HttpRegisterFolder |
HttpRegisterIcon |
HttpRegisterTree