tfHttpdUserSendResponseStatusLine
Table of Contents >> Application Reference >> Web Server
#include <trsocket.h> |
int tfHttpdUserSendResponseStatusLine | ( |
ttHttpdUserConHandle userConHandle, | |
int version, | |
int status, | |
ttUserConstCharPtr reasonPhrasePtr, | |
int flags | |
); |
Function Description
Low-level API for sending a customer defined HTTP response that overrides the default HTTP response: Send the HTTP response status line through the connection.
Parameters
- userConHandle
- User connection handle
- version
- HTTP version.
- status
- HTTP response status code, an integer number between 200-599
- reasonPhrasePtr
- Reason phrase string, for example: âNot Foundâ
- flags
- Bit mask: currently the only supported flag TM_HTTPD_END indicating the end of the response message. This indicates that the response consists of the status line only, no headers or body will follow.
Returns
- TM_ENOERROR
- Success
- TM_EINVAL
- Invalid userConHandle.
- TM_EPERM
- The status line has already been sent out.
- TM_EWOULDBLOCK
- Indicates that the send queue is full, the response could not be sent out now, the user should try again.