FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
esp32_https_server/src/HTTPSConnection.hpp at master · db3000/esp32_https_server · GitHub
db3000
esp32_https_server
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
esp32_https_server
/
src
/
HTTPSConnection.hpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
63 lines (49 loc) · 1.43 KB
Breadcrumbs
esp32_https_server
/
src
/
HTTPSConnection.hpp
Copy path
File metadata and controls
63 lines (49 loc) · 1.43 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#
ifndef
SRC_HTTPSCONNECTION_HPP_
#
define
SRC_HTTPSCONNECTION_HPP_
#
include
<
Arduino.h
>
#
include
<
string
>
//
Required for SSL
#
include
"
mbedtls/ssl.h
"
#
undef
read
//
Required for sockets
#
include
"
lwip/netdb.h
"
#
undef
read
#
include
"
lwip/sockets.h
"
#
include
"
HTTPSServerConstants.hpp
"
#
include
"
HTTPConnection.hpp
"
#
include
"
HTTPHeaders.hpp
"
#
include
"
HTTPHeader.hpp
"
#
include
"
ResourceResolver.hpp
"
#
include
"
ResolvedResource.hpp
"
#
include
"
ResourceNode.hpp
"
#
include
"
HTTPRequest.hpp
"
#
include
"
HTTPResponse.hpp
"
namespace
httpsserver
{
/*
*
* \brief Connection class for an open TLS-enabled connection to an HTTPSServer
*/
class
HTTPSConnection
:
public
HTTPConnection
{
public:
HTTPSConnection
(ResourceResolver * resResolver);
virtual
~HTTPSConnection
();
virtual
int
initialize
(
int
serverSocketID, mbedtls_ssl_config *sslConfig, HTTPHeaders *defaultHeaders);
virtual
void
closeConnection
();
virtual
bool
isSecure
();
bool
setup
(mbedtls_ssl_config *sslConfig);
bool
handshake
();
int
shutdown
();
protected:
friend
class
HTTPRequest
;
friend
class
HTTPResponse
;
virtual
size_t
readBytesToBuffer
(byte* buffer,
size_t
length);
virtual
size_t
pendingByteCount
();
virtual
bool
canReadData
();
virtual
size_t
writeBuffer
(byte* buffer,
size_t
length);
private:
//
SSL context for this connection
mbedtls_ssl_context _ssl;
bool
_sslCreated;
int
_socket;
};
}
/*
namespace httpsserver
*/
#
endif
/*
SRC_HTTPSCONNECTION_HPP_
*/
Back
|
FazBrowse Home
|
New Git URL