HttpServer handles and manipulates the HTTP server on devices.
More...
HttpServer handles and manipulates the HTTP server on devices.
◆ getPage()
| string HttpServer::getPage |
( |
string |
| ) |
|
Returns the page contents at the specified URL.
- Parameters
-
| url,the | URL of the page of interest. |
- Returns
- string, the page contents at the specified URL.
◆ getPassword()
| string HttpServer::getPassword |
( |
| ) |
|
Returns the htaccess password for the HTTP server.
- Returns
- string, the htaccess password for the HTTP server.
◆ getPortNumber()
| short HttpServer::getPortNumber |
( |
| ) |
|
Returns the port number of the HTTP service.
- Returns
- int, the port number of the HTTP service.
◆ getUsername()
| string HttpServer::getUsername |
( |
| ) |
|
Returns the htaccess username for the HTTP server.
- Returns
- string, the htaccess username for the HTTP server.
◆ isEnabled()
| bool HttpServer::isEnabled |
( |
| ) |
|
Returns true if the HTTP service is enabled, otherwise false.
- Returns
- bool, true if the HTTP service is enabled, otherwise false.
◆ onRequest()
This delegate pass the url and tcp connection on HTTP request and returns true if successful, otherwise false.
- url, the url of the HTTP connection.
- connection, connection, the Tcp connection of the HTTP connection.
- Returns
- bool, true if successful, otherwise false.
◆ sendFileResponse()
send the HTTP response back to client with given file.
- Parameters
-
| connection,the | Tcp connection of the HTTP response. |
| filePath,the | file get send in the HTTP response.
|
◆ sendNotFoundResponse()
send the 404 not found HTTP response back to client with given file.
- Parameters
-
| connection,the | Tcp connection of the HTTP response. |
◆ sendResponse()
send the HTTP response back to client with given content.
- Parameters
-
| connection,the | Tcp connection of the HTTP response. |
| content,the | content of the HTTP response. |
◆ sendTypedResponse()
| void HttpServer::sendTypedResponse |
( |
TcpConnection |
, |
|
|
string |
, |
|
|
string |
|
|
) |
| |
send the HTTP response back to client with given content and content type.
- Parameters
-
| connection,the | Tcp connection of the HTTP response. |
| content,the | content of the HTTP response.
|
| contentType,the | contentType of the HTTP response.
|
◆ setEnable()
| void HttpServer::setEnable |
( |
bool |
| ) |
|
Enables or disables the HTTP service.
- Parameters
-
| bEnable,true | to enable the HTTP service, false to disable it. |
◆ setPageContents()
| void HttpServer::setPageContents |
( |
string |
, |
|
|
string |
|
|
) |
| |
Sets the page contents at the specified URL.
- Parameters
-
| url,the | URL of the page of interest. |
| contents,the | contents of the page of interest. |
◆ setPassword()
| void HttpServer::setPassword |
( |
string |
| ) |
|
Sets the htaccess password for the HTTP server.
- Parameters
-
| password,the | htaccess password for the HTTP server. |
◆ setPortNumber()
| void HttpServer::setPortNumber |
( |
short |
| ) |
|
Sets the port number of the HTTP service.
- Parameters
-
| num,the | port number to set the HTTP service to. |
◆ setUsername()
| void HttpServer::setUsername |
( |
string |
| ) |
|
Sets the htaccess username for the HTTP server.
- Parameters
-
| username,the | htaccess username for the HTTP server. |
The documentation for this class was generated from the following file: