tfHttpdUserSendFile
Table of Contents >> Application Reference >> Web Server
| #include <trsocket.h> |
| int tfHttpdUserSendFile | ( |
| ttHttpdUserConHandle userConHandle, | |
| const char TM_FAR * filePathPtr, | |
| int flags | |
| ); |
Function Description
Send a file to the HTTP client. To be called in CGI handler or SSI handler. If the file matches the SSI file filters, it will be parsed for the SSI tags. SSI file including another SSI file can be achieved by calling this function. You can also send a file to respond to a CGI request by calling this function from the CGI handler.
Parameters
- userConHandle
- User handle to the HTTP connection
- filePathPtr
- Path of the file to be sent, relative to the web server root.
- flags
- Allowed values are: TM_BLOCKING_ON, TM_BLOCKING_OFF
Returns
- TM_ENOERROR
- No error
- TM_EINVAL
- userConHandle is invalid or filePathPtr is NULL
- TM_ENOENT
- File doesnât exist