|
MCS
0.3.3-alpha7
|
Hold all environment variables. More...
#include <mcs.hh>
Public Member Functions | |
| Env (string app="mcs", string inipath="mcs.conf") | |
| Env constructor. More... | |
| Env (const Env &) | |
| Declared to avoid using of default copy constructor. More... | |
| Env & | operator= (const Env &) |
| Declared to avoid using of default assignment operator. More... | |
| ~Env () | |
| Destructor. More... | |
Public Attributes | |
| string | appname |
| Application name. More... | |
| string | appvers |
| Application version. More... | |
| bool | cl_autoexec |
| Auto execute batch file "auto". More... | |
| int | cl_chunksize |
| Default size of a chunk of a Serializable object, that is chunks that goes through the network. More... | |
| bool | cl_clean_logout |
| Clean work dir on user logout. More... | |
| bool | cl_createlocal |
| Create local thread. More... | |
| bool | cl_custom_auth |
| Activate custom authentication. More... | |
| bool | cl_have_db |
| Activate DB facilities. More... | |
| bool | cl_local_kills_mcs |
| When the local thread dies the server will be stopped. More... | |
| bool | cl_logfile |
| Use log file. More... | |
| bool | cl_logstdout |
| Copy log on stdout. More... | |
| bool | cl_read_grants |
| Read grants from the DB table (deprecated). More... | |
| bool | cl_restartlocal |
| Resart local thread when it dies. More... | |
| bool | cl_use_ssl |
| Use secure connections. More... | |
| bool | cl_work |
| Use private (per user) working dir, otherwise use path. More... | |
| bool | cl_work_cid |
| Work path is created using cid if true, otherwise with the user name. More... | |
| Conf * | cnf |
| Pointer to the Conf object used to read the configuration file. More... | |
| string | db_host |
| Host running database server. More... | |
| string | db_name |
| Database name. More... | |
| string | db_pass |
| Password. More... | |
| string | db_user |
| User name for the local thread access to DB. More... | |
| ofstream * | flog |
| Stream to write the log file. More... | |
| string | inipath |
| Application ini file. More... | |
| string | interface |
| Server interface name. More... | |
| LocalThread * | local |
| string | localhost |
| Host name. More... | |
| int | max_users |
| How many clients can be connected at the same time. More... | |
| string | path |
| Main server path (APPD). More... | |
| int | port |
| Server port number. More... | |
| Server * | server |
| void * | ssl_ctx |
| Pointer to the global SSL context object, used if cl_use_ssl is true. More... | |
| string | sslcert |
| Path to the SSL certificate file, used if cl_use_ssl = 1. More... | |
| string | sslpriv |
| Path to the SSL private key file, used if cl_use_ssl = 1. More... | |
| unsigned int | timeout |
| Timeout for client operations, in millisecond. More... | |
Private Member Functions | |
| void | chkTree () |
| Check the entire MCS tree. More... | |
| void | DumpConf () |
| Dump environment to configuration file. More... | |
| void | LoadConf () |
| Load configuration entries. More... | |
Private Attributes | |
| DBConn | db |
Hold all environment variables.
This class reads a configuration file named "mcs.conf" that must be in the working directory of execution, which contains all environment variables for the execution of a MCS-based application. You can see an example of a configuration file in the MCS distribution tree "share/test/mcs.conf". The file will be read using the Conf class. If one of the environment variable, or the entire file, aren't found then a default value will be assumed.
An Env object (or a derived one) must be istantiated in the main program, then used as parameter for the Server constructor.
| mcs::Env::Env | ( | string | app = "mcs", |
| string | inipath = "mcs.conf" |
||
| ) |
| mcs::Env::Env | ( | const Env & | ) |
Declared to avoid using of default copy constructor.
|
private |
|
private |
Declared to avoid using of default assignment operator.
| int mcs::Env::cl_chunksize |
Default size of a chunk of a Serializable object, that is chunks that goes through the network.
| bool mcs::Env::cl_clean_logout |
| bool mcs::Env::cl_custom_auth |
| bool mcs::Env::cl_local_kills_mcs |
| bool mcs::Env::cl_read_grants |
| bool mcs::Env::cl_restartlocal |
| bool mcs::Env::cl_work |
| bool mcs::Env::cl_work_cid |
| Conf* mcs::Env::cnf |
| string mcs::Env::db_user |
| int mcs::Env::max_users |
| void* mcs::Env::ssl_ctx |
| string mcs::Env::sslcert |
| string mcs::Env::sslpriv |
| unsigned int mcs::Env::timeout |
|
MCS (My Customizable Server) ver. 0.3.3-alpha7
|