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