New configuration variable, log_to_file
Shutdown function added to TcpClient Shutdown function added to TcpServer Renamed socket to server_tcp_socket in TcpServer Implemented ConfigReader class
This commit is contained in:
@ -8,8 +8,7 @@
|
||||
#include "Defs.hpp"
|
||||
|
||||
#include <string>
|
||||
#include <streambuf>
|
||||
#include <istream>
|
||||
#include <map>
|
||||
|
||||
struct Utility
|
||||
{
|
||||
@ -57,6 +56,18 @@ struct Utility
|
||||
|
||||
static const std::string &ToString(byte *bytes, uint16 start_index = 0, uint16 lenght = 0);
|
||||
};
|
||||
|
||||
struct ConfigReader
|
||||
{
|
||||
const void ReadConfig(const std::string &file_name);
|
||||
const std::map<std::string, std::string> &ReadNodes();
|
||||
|
||||
const std::string &operator[](uint16 index);
|
||||
|
||||
private:
|
||||
std::map<std::string, std::string> nodes;
|
||||
std::string file_content;
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user