added read-only mode, added optional HTTP JSON port

This commit is contained in:
john30
2015-05-01 08:38:08 +02:00
parent 605bca9ff0
commit 7e98f485e1
4 changed files with 177 additions and 63 deletions
+8 -1
View File
@@ -91,7 +91,7 @@ private:
* @param running set to false when the server shall be stopped.
* @return result string to send back to the client.
*/
string decodeMessage(const string& data, bool& connected, bool& listening, bool& running);
string decodeMessage(const string& data, const bool isHttp, bool& connected, bool& listening, bool& running);
/**
* Execute the read command.
@@ -193,6 +193,13 @@ private:
*/
string executeHelp();
/**
* Execute the HTTP GET command.
* @param args the arguments passed to the command (starting with the command itself).
* @return the result string.
*/
string executeGet(vector<string> &args);
/**
* Get the updates received since the specified time.
* @param since the start time from which to add updates (inclusive).