| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -11,6 +11,9 @@ namespace httpsserver { | |||
| 11 | 11 | ||
| 12 | 12 | class WebsocketHandler; | |
| 13 | 13 | ||
| 14 | + /** | ||
| 15 | + * \brief Internal class to handle the state of a connection | ||
| 16 | + */ | ||
| 14 | 17 | class ConnectionContext { | |
| 15 | 18 | public: | |
| 16 | 19 | ConnectionContext(); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -31,6 +31,9 @@ | |||
| 31 | 31 | ||
| 32 | 32 | namespace httpsserver { | |
| 33 | 33 | ||
| 34 | + /** | ||
| 35 | + * \brief Represents a single open connection for the plain HTTPServer, without TLS | ||
| 36 | + */ | ||
| 34 | 37 | class HTTPConnection : private ConnectionContext { | |
| 35 | 38 | public: | |
| 36 | 39 | HTTPConnection(ResourceResolver * resResolver); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,6 +6,9 @@ | |||
| 6 | 6 | ||
| 7 | 7 | namespace httpsserver { | |
| 8 | 8 | ||
| 9 | + /** | ||
| 10 | + * \brief Represents a single name/value pair of an HTTP header | ||
| 11 | + */ | ||
| 9 | 12 | class HTTPHeader { | |
| 10 | 13 | public: | |
| 11 | 14 | HTTPHeader(const std::string &name, const std::string &value); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,6 +12,9 @@ | |||
| 12 | 12 | ||
| 13 | 13 | namespace httpsserver { | |
| 14 | 14 | ||
| 15 | + /** | ||
| 16 | + * \brief Groups and manages a set of HTTPHeader instances | ||
| 17 | + */ | ||
| 15 | 18 | class HTTPHeaders { | |
| 16 | 19 | public: | |
| 17 | 20 | HTTPHeaders(); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,7 +10,7 @@ | |||
| 10 | 10 | namespace httpsserver { | |
| 11 | 11 | class HTTPRequest; | |
| 12 | 12 | /** | |
| 13 | - * A middleware function that can be registered at the server. | ||
| 13 | + * \brief A middleware function that can be registered at the server. | ||
| 14 | 14 | * | |
| 15 | 15 | * It will be called before an incoming request is passed to any HTTPSCallbackFunction and may perform | |
| 16 | 16 | * operations like redirects or authentication. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -17,6 +17,12 @@ enum HTTPNodeType { | |||
| 17 | 17 | WEBSOCKET | |
| 18 | 18 | }; | |
| 19 | 19 | ||
| 20 | + /** | ||
| 21 | + * \brief Base class for a URL/route-handler in the server. | ||
| 22 | + * | ||
| 23 | + * Use ResourceNode for requests that access dynamic or static resources or HttpNode for routes that | ||
| 24 | + * create Websockets. | ||
| 25 | + */ | ||
| 20 | 26 | class HTTPNode { | |
| 21 | 27 | public: | |
| 22 | 28 | HTTPNode(const std::string &path, const HTTPNodeType nodeType, const std::string &tag = ""); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,6 +15,9 @@ | |||
| 15 | 15 | ||
| 16 | 16 | namespace httpsserver { | |
| 17 | 17 | ||
| 18 | + /** | ||
| 19 | + * \brief Represents the request stream for an HTTP request | ||
| 20 | + */ | ||
| 18 | 21 | class HTTPRequest { | |
| 19 | 22 | public: | |
| 20 | 23 | HTTPRequest(ConnectionContext * con, HTTPHeaders * headers, HTTPNode * resolvedNode, std::string method, ResourceParameters * params, std::string requestString); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,6 +19,9 @@ | |||
| 19 | 19 | ||
| 20 | 20 | namespace httpsserver { | |
| 21 | 21 | ||
| 22 | + /** | ||
| 23 | + * \brief Represents the response stream of an HTTP request | ||
| 24 | + */ | ||
| 22 | 25 | class HTTPResponse : public Print { | |
| 23 | 26 | public: | |
| 24 | 27 | HTTPResponse(ConnectionContext * con); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,6 +5,9 @@ | |||
| 5 | 5 | #include "HTTPResponse.hpp" | |
| 6 | 6 | ||
| 7 | 7 | namespace httpsserver { | |
| 8 | + /** | ||
| 9 | + * \brief A callback function that will be called by the server to handle a request | ||
| 10 | + */ | ||
| 8 | 11 | typedef void (HTTPSCallbackFunction)(HTTPRequest * req, HTTPResponse * res); | |
| 9 | 12 | } | |
| 10 | 13 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -26,6 +26,9 @@ | |||
| 26 | 26 | ||
| 27 | 27 | namespace httpsserver { | |
| 28 | 28 | ||
| 29 | + /** | ||
| 30 | + * \brief Connection class for an open TLS-enabled connection to an HTTPSServer | ||
| 31 | + */ | ||
| 29 | 32 | class HTTPSConnection : public HTTPConnection { | |
| 30 | 33 | public: | |
| 31 | 34 | HTTPSConnection(ResourceResolver * resResolver); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments