webserver.c File Reference

Functions for implementing a WebServer on the Make Controller Board. More...

Go to the source code of this file.


Functions

int WebServer_SetActive (int active)
 Start the WebServer up, listening on port 80.
int WebServer_GetActive (void)
 Read the active state of the WebServer subsystem.
int WebServer_SetListenPort (int port)
 Set the port that the webserver should listen on for new connections.
int WebServer_GetListenPort (void)
 Get the port that the webserver is currently listening on.
int WebServer_Route (char *address, int(*handler)(char *requestType, char *address, char *requestBuffer, int requestMaxSize, void *socket, char *buffer, int len))
 Adds a route handler to the WebServer.
int WebServer_WriteResponseOkHTML (void *socket)
 Writes the HTTP OK message and sets the content type to HTML.
int WebServer_WriteResponseOkPlain (void *socket)
 Writes the HTTP OK message and sets the content type to plain text.
int WebServer_WriteHeader (int includeCSS, void *socket, char *buffer, int len)
 Writes the HTML header.
int WebServer_WriteBodyStart (char *reloadAddress, void *socket, char *buffer, int len)
 Writes the start of the BODY tag.
int WebServer_WriteBodyEnd (void *socket)
 Writes the end of the Body tag - and the final end of HTML tag.
bool WebServer_GetPostData (void *socket, char *requestBuffer, int maxSize)
 Set the data of an incoming HTTP POST request to the given buffer.
int WebServer_ParseFormElements (char *request, HtmlForm *form)
 Extract the elements of an HTML form into key/value pairs.

Detailed Description

Functions for implementing a WebServer on the Make Controller Board.

Definition in file webserver.c.