tfHttpdUserClose
Table of Contents >> Application Reference >> Web Server
| #include <trsocket.h> |
| int tfHttpdUserClose | ( |
| ttHttpdUserConHandle conHandle, | |
| int errorCode | |
| ); |
Function Description
This function will close an HTTP connection. Users may want to close a connection early, for example to refuse to serve a client based on its address information etc. If the user gets a TM_HTTPD_CON_CLOSE event, there is no need to call tfHttpdUserClose() any more.
Parameters
- conHandle
- HTTP connection handle
- errorCode
- set this if there has been an error on other API calls, set to TM_ENOERROR if no error has happened. If set to TM_ENOERROR, Treck will close the connection normally. If not, Treck will reset and close the connection.
Returns
- TM_ENOERROR
- Success
- TM_EINVAL
- Invalid userConHandle or tfHttpdUserClose() has already been called for this userConHandle.