A http server.
More...
#include <libppbase/base_http/HTTPServer.h>
List of all members.
Detailed Description
A http server.
- Author:
- Christoph Schwarz
- Version:
- $Id: HTTPServer.h 21 2010-09-05 04:18:17Z cschwarz1 $
Constructor & Destructor Documentation
base_http::HTTPServer::HTTPServer |
( |
const char * |
name = NULL , |
|
|
base::Socket * |
sock = NULL , |
|
|
const base::String & |
addr = "" | |
|
) |
| | |
Constructor.
- Parameters:
-
| name | server name |
| sock | socket to client |
| addr | client's ip address |
Member Function Documentation
base::String base_http::HTTPServer::createDigestHeader |
( |
const char * |
realm |
) |
|
Creates a digest authorization header.
- Parameters:
-
- Returns:
- the header
Creates a new nonce for digest authorization.
- Returns:
- the new nonce
Creates an authorization-info header.
- Returns:
- the header
const char* base_http::HTTPServer::getNonce |
( |
|
) |
const |
Returns the nonce.
- Returns:
- the nonce
const char* base_http::HTTPServer::getServerName |
( |
|
) |
const |
Returns the server name.
- Returns:
- the server name
Reads the http header.
- Returns:
- a new http request, where only the headers have been read, NULL on EOF
Reads the next http request.
- Returns:
- NULL on EOF
void base_http::HTTPServer::sendError |
( |
const HTTPRequest & |
request, |
|
|
int |
code, |
|
|
const char * |
message, |
|
|
const char * |
fname = NULL , |
|
|
const char * |
body = NULL | |
|
) |
| | |
Sends a http error message back to the client.
- Parameters:
-
| request | the http request |
| code | the http status code |
| message | the http status message |
| fname | the file name to read the message from |
| body | the message body |
void base_http::HTTPServer::sendResponse |
( |
HTTPResponse & |
response |
) |
|
Sends a http response to the client.
- Parameters:
-
| response | the response to send |
void base_http::HTTPServer::setServerName |
( |
const char * |
name |
) |
|
Sets the server name.
- Parameters:
-
The documentation for this class was generated from the following file: