NetBurner 3.3.4
PDF Version
http.h File Reference

NetBurner HTTP Web Server Header File. More...

#include <nettypes.h>
#include <stddef.h>

Go to the source code of this file.

Classes

struct  HTTP_Request
 HTTP Request Structure. More...
 
class  HtmlPageHandler
 Base class for all GET handlers. To handle GET requests for a specific URL in your application, build a GET handler object for that specifif URL. A NULL name will be a catch all for all GET requests. More...
 
class  CallBackFunctionPageHandler
 Implements the HtmlPageHandler class as a function pointer callback for GET requests. More...
 

Enumerations

enum  HTTP_RequestTypes { tUnknown , tGet , tPost , tHead }
 HTTP request types for HTTP page handler callback functions. More...
 
enum  HTTP_ACCESS
 HTTP page access return values.
 

Functions

HTTP_ACCESS CheckHttpAccess (int sock, int access_level, HTTP_Request &Req)
 All HTTP requests go though this function. More...
 
void StartHttp (uint16_t port, bool RunConfigMirror)
 Start the HTTP web server. Further documentation in the Initialization section Initialization - System Initialization Functions. More...
 
void StopHttp ()
 Stop the HTTP web server. More...
 
void SendHTMLHeader (int sock)
 Send a HTML response header. More...
 
void SendHTMLHeaderWCookie (int sock, char *cookie)
 Send a HTML response header and cookie. More...
 
void SendTextHeader (int sock)
 Send a HTML plain text header. More...
 
void SendGifHeader (int sock)
 Send a HTML GIF header. More...
 
void EmptyResponse (int sock)
 Send an empty response back. More...
 
void RedirectResponse (int sock, PCSTR new_page)
 Redirect a HTTP request to a different page. More...
 
void NotFoundResponse (int sock, PCSTR new_page)
 Send a page not found response. More...
 
void ForbiddenResponse (int sock, PCSTR new_page)
 Send a page is forbidden response. More...
 
void NotAvailableResponse (int sock, PCSTR new_page)
 Send a response indicating that the requested resource is not available at this time. More...
 
void BadRequestResponse (int sock, PCSTR url, PCSTR data)
 Send a response indicating that the client request itself is faulty in some manner. More...
 
int writeallsafestring (int fd, PCSTR str)
 Send a string and escape all special characters. More...
 
int writesafestring (int fd, PCSTR str, size_t strLength)
 Send a string with a specified length and escape all special characters. More...
 
int httpstricmp (PCSTR str1, PCSTR strIsUpper2)
 Special string compare. Returns 1 if the strings match until one string ends with a null (0). More...
 

Detailed Description

NetBurner HTTP Web Server Header File.