tfHttpdUserInitOptions
Table of Contents >> Application Reference >> Web Server
| #include <trsocket.h> |
| int tfHttpdUserInitOptions | ( |
| int optName, | |
| const char TM_FAR * optVal, | |
| int optLen | |
| ); |
Function Description
This API allows the user to set initialization-time options for the web server. The options will apply to every web server created by tfHttpdUserStart(). This function must be called before tfHttpdUserStart().
Parameters
- optName
- Name of the option to set
- optVal
- Pointer to the value to set the option to
- optLen
- Length of the variable pointed to by optVal
Options
- TM_HTTPD_INIT_OPT_HEADER_LEN
- Size of internal buffer to store incoming HTTP request header lines in. If a header exceeds this length, the end of the header will be dropped. The HTTP request will also be rejected (unless the server is configured to accept it anyhow â see tfHttpdUserSetOptions()). Default: 256
- TM_HTTPD_INIT_OPT_URL_LEN
- Size of internal buffer to store incoming HTTP request URI. If the incoming URI exceeds this length, the request will be rejected. Default: 256
Returns
- TM_ENOERROR
- Success
- TM_ENOPERM
- Function was not called before tfHttpdUserStart()
- TM_EINVAL
- Invalid input parameter