mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-11-16 07:48:07 +01:00
parse new SERVERNAME config variable
This commit is contained in:
parent
c5add889cb
commit
0c2365e3ea
2 changed files with 5 additions and 0 deletions
|
@ -99,6 +99,8 @@ RelayConfigs::RelayConfigs( const char* cfile )
|
|||
m_port = atoi( value );
|
||||
} else if ( 0 == strcmp( line, "NTHREADS" ) ) {
|
||||
m_nWorkerThreads = atoi( value );
|
||||
} else if ( 0 == strcmp( line, "SERVERNAME" ) ) {
|
||||
m_serverName = value;
|
||||
} else {
|
||||
logf( "unknown key %s with value %s\n",
|
||||
line, value );
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#ifndef _CONFIGS_H_
|
||||
#define _CONFIGS_H_
|
||||
|
||||
#include <string>
|
||||
#include "xwrelay_priv.h"
|
||||
|
||||
class RelayConfigs {
|
||||
|
@ -36,6 +37,7 @@ class RelayConfigs {
|
|||
int GetNWorkerThreads() { return m_nWorkerThreads; }
|
||||
time_t GetAllConnectedInterval() { return m_allConnInterval; }
|
||||
time_t GetHeartbeatInterval() { return m_heartbeatInterval; }
|
||||
const char* GetServerName() { return m_serverName.c_str(); }
|
||||
|
||||
|
||||
private:
|
||||
|
@ -46,6 +48,7 @@ class RelayConfigs {
|
|||
int m_ctrlport;
|
||||
int m_port;
|
||||
int m_nWorkerThreads;
|
||||
std::string m_serverName;
|
||||
|
||||
static RelayConfigs* instance;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue