12 #include "../OSSupport/Network.h"
13 #include "../IniFile.h"
14 #include "../mbedTLS++/CryptoKey.h"
15 #include "../mbedTLS++/X509Cert.h"
std::vector< cServerHandlePtr > cServerHandlePtrs
std::vector< AString > AStringVector
Provides storage for an incoming HTTP request.
cCallbacks * m_Callbacks
The callbacks to call for various events.
bool Initialize(void)
Initializes the server - reads the cert files etc.
void NewRequest(cHTTPServerConnection &a_Connection, cHTTPIncomingRequest &a_Request)
Called by cHTTPServerConnection when it finishes parsing the request header.
void RequestBody(cHTTPServerConnection &a_Connection, cHTTPIncomingRequest &a_Request, const void *a_Data, size_t a_Size)
Called by cHTTPConenction when it receives more data for the request body.
cServerHandlePtrs m_ServerHandles
The cNetwork API handle for the listening socket.
cTCPLink::cCallbacksPtr OnIncomingConnection(const AString &a_RemoteIPAddress, UInt16 a_RemotePort)
Called by cHTTPServerListenCallbacks when there's a new incoming connection.
void Stop(void)
Stops the server, drops all current connections.
bool Start(cCallbacks &a_Callbacks, const AStringVector &a_Ports)
Starts the server and assigns the callbacks to use for incoming requests.
std::shared_ptr< const cSslConfig > m_SslConfig
Configuration for server ssl connections.
void RequestFinished(cHTTPServerConnection &a_Connection, cHTTPIncomingRequest &a_Request)
Called by cHTTPServerConnection when it detects that the request has finished (all of its body has be...
virtual void OnRequestBody(cHTTPServerConnection &a_Connection, cHTTPIncomingRequest &a_Request, const char *a_Data, size_t a_Size)=0
Called when another part of request body has arrived.
virtual void OnRequestBegun(cHTTPServerConnection &a_Connection, cHTTPIncomingRequest &a_Request)=0
Called when a new request arrives over a connection and all its headers have been parsed.
virtual void OnRequestFinished(cHTTPServerConnection &a_Connection, cHTTPIncomingRequest &a_Request)=0
Called when the request body has been fully received in previous calls to OnRequestBody()
std::shared_ptr< cCallbacks > cCallbacksPtr