8000 Add class descriptions · banan4x/esp32_https_server@cfbe927 · GitHub
[go: up one dir, main page]

Skip to content

Commit cfbe927

Browse files
committed
Add class descriptions
1 parent c7c04ad commit cfbe927

20 files changed

+163
-5
lines changed

src/ConnectionContext.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ namespace httpsserver {
1111

1212
class WebsocketHandler;
1313

14+
/**
15+
* \brief Internal class to handle the state of a connection
16+
*/
1417
class ConnectionContext {
1518
public:
1619
ConnectionContext();

src/HTTPConnection.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131

3232
namespace httpsserver {
3333

34+
/**
35+
* \brief Represents a single open connection for the plain HTTPServer, without TLS
36+
*/
3437
class HTTPConnection : private ConnectionContext {
3538
public:
3639
HTTPConnection(ResourceResolver * resResolver);

src/HTTPHeader.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
namespace httpsserver {
88

9+
/**
10+
* \brief Represents a single name/value pair of an HTTP header
11+
*/
912
class HTTPHeader {
1013
public:
1114
HTTPHeader(const std::string &name, const std::string &value);

src/HTTPHeaders.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212

1313
namespace httpsserver {
1414

15+
/**
16+
* \brief Groups and manages a set of HTTPHeader instances
17+
*/
1518
class HTTPHeaders {
1619
public:
1720
HTTPHeaders();

src/HTTPMiddlewareFunction.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
namespace httpsserver {
1111
class HTTPRequest;
1212
/**
13-
* A middleware function that can be registered at the server.
13+
* \brief A middleware function that can be registered at the server.
1414
*
1515
* It will be called before an incoming request is passed to any HTTPSCallbackFunction and may perform
1616
* operations like redirects or authentication.

src/HTTPNode.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ enum HTTPNodeType {
1717
WEBSOCKET
1818
};
1919

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+
*/
2026
class HTTPNode {
2127
public:
2228
HTTPNode(const std::string &path, const HTTPNodeType nodeType, const std::string &tag = "");

src/HTTPRequest.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515

1616
namespace httpsserver {
1717

18+
/**
19+
* \brief Represents the request stream for an HTTP request
20+
*/
1821
class HTTPRequest {
1922
public:
2023
HTTPRequest(ConnectionContext * con, HTTPHeaders * headers, HTTPNode * resolvedNode, std::string method, ResourceParameters * params, std::string requestString);

src/HTTPResponse.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919

2020
namespace httpsserver {
2121

22+
/**
23+
* \brief Represents the response stream of an HTTP request
24+
*/
2225
class HTTPResponse : public Print {
2326
public:
2427
HTTPResponse(ConnectionContext * con);

src/HTTPSCallbackFunction.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
#include "HTTPResponse.hpp"
66

77
namespace httpsserver {
8+
/**
9+
* \brief A callback function that will be called by the server to handle a request
10+
*/
811
typedef void (HTTPSCallbackFunction)(HTTPRequest * req, HTTPResponse * res);
912
}
1013

src/HTTPSConnection.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626

2727
namespace httpsserver {
2828

29+
/**
30+
* \brief Connection class for an open TLS-enabled connection to an HTTPSServer
31+
*/
2932
class HTTPSConnection : public HTTPConnection {
3033
public:
3134
HTTPSConnection(ResourceResolver * resResolver);

0 commit comments

Comments
 (0)
0