add configuiration to bind to specific IP

This commit is contained in:
Jason D. McCormick 2020-06-12 13:16:53 -04:00
parent 815165141c
commit 0cfd041de9
7 changed files with 33 additions and 9 deletions

View file

@ -45,7 +45,8 @@ m_logFileLevel(0U),
m_logFilePath(),
m_logFileRoot(),
m_networkPort(0U),
m_networkDebug(false)
m_networkDebug(false),
m_networkBindAddr()
{
}
@ -112,6 +113,8 @@ bool CConf::read()
m_networkPort = (unsigned int)::atoi(value);
else if (::strcmp(key, "Debug") == 0)
m_networkDebug = ::atoi(value) == 1;
else if (::strcmp(key, "BindAddress") == 0)
m_networkBindAddr = value;
}
}
@ -169,3 +172,8 @@ bool CConf::getNetworkDebug() const
{
return m_networkDebug;
}
std::string CConf::getNetworkBindAddr() const
{
return m_networkBindAddr;
}