ESP32 HTTPS Server: /home/frank/Projekte/esp32/https_server/esp32_https_server/src/HTTPSConnection.hpp Source File

1 #ifndef SRC_HTTPSCONNECTION_HPP_

2 #define SRC_HTTPSCONNECTION_HPP_

3 

4 #include <Arduino.h>

5 

6 #include <string>

7 

8 

9 #include "openssl/ssl.h"

10 #undef read

11 

12 

13 #include "lwip/netdb.h"

14 #undef read

15 #include "lwip/sockets.h"

16 

17 #include "HTTPSServerConstants.hpp"

18 #include "HTTPConnection.hpp"

19 #include "HTTPHeaders.hpp"

20 #include "HTTPHeader.hpp"

21 #include "ResourceResolver.hpp"

22 #include "ResolvedResource.hpp"

23 #include "ResourceNode.hpp"

24 #include "HTTPRequest.hpp"

25 #include "HTTPResponse.hpp"

26 

28 

33 public:

36 

37  virtual int initialize(int serverSocketID, SSL_CTX * sslCtx, HTTPHeaders *defaultHeaders);

38  virtual void closeConnection();

39  virtual bool isSecure();

40 

41 protected:

44 

45  virtual size_t readBytesToBuffer(byte* buffer, size_t length);

46  virtual size_t pendingByteCount();

47  virtual bool canReadData();

48  virtual size_t writeBuffer(byte* buffer, size_t length);

49 

50 private:

51 

52  SSL * _ssl;

53 

54 };

55 

56 }

57 

58 #endif

Represents the request stream for an HTTP request.

Definition: HTTPRequest.hpp:22

Represents the response stream of an HTTP request.

Definition: HTTPResponse.hpp:25

Connection class for an open TLS-enabled connection to an HTTPSServer.

Definition: HTTPSConnection.hpp:32

This class is used internally to resolve a string URL to the corresponding HTTPNode.

Definition: ResourceResolver.hpp:22

Represents a single open connection for the plain HTTPServer, without TLS.

Definition: HTTPConnection.hpp:38

Definition: ConnectionContext.cpp:3

virtual int initialize(int serverSocketID, SSL_CTX *sslCtx, HTTPHeaders *defaultHeaders)

Definition: HTTPSConnection.cpp:25