Added cHTTPServer callbacks; fixed keep-alives.
The HTTP server now calls callbacks specified in its start function (debugified atm.) and it processes multiple requests on a single connection.
This commit is contained in:
@@ -52,9 +52,12 @@ public:
|
||||
/// Sends the data as the response (may be called multiple times)
|
||||
void Send(const AString & a_Data) { Send(a_Data.data(), a_Data.size()); }
|
||||
|
||||
/// Finishes sending current response, gets ready for receiving another request (HTTP 1.1 keepalive)
|
||||
/// Indicates that the current response is finished, gets ready for receiving another request (HTTP 1.1 keepalive)
|
||||
void FinishResponse(void);
|
||||
|
||||
/// Resets the connection for a new request. Depending on the state, this will send an "InternalServerError" status or a "ResponseEnd"
|
||||
void AwaitNextRequest(void);
|
||||
|
||||
protected:
|
||||
typedef std::map<AString, AString> cNameValueMap;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user