Add an inactivity timer to the gateway.

This commit is contained in:
Jonathan Naylor
2017-03-18 07:13:14 +00:00
parent 411173efdc
commit 1225e0bc87
4 changed files with 39 additions and 5 deletions
+9 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2015,2016 by Jonathan Naylor G4KLX
* Copyright (C) 2015,2016,2017 by Jonathan Naylor G4KLX
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -52,6 +52,7 @@ m_networkReloadTime(0U),
m_networkParrotAddress("127.0.0.1"),
m_networkParrotPort(0U),
m_networkStartup(9999U),
m_networkInactivityTimeout(0U),
m_networkDebug(false)
{
}
@@ -134,6 +135,8 @@ bool CConf::read()
m_networkParrotPort = (unsigned int)::atoi(value);
else if (::strcmp(key, "Startup") == 0)
m_networkStartup = (unsigned int)::atoi(value);
else if (::strcmp(key, "InactivityTimeout") == 0)
m_networkInactivityTimeout = (unsigned int)::atoi(value);
else if (::strcmp(key, "Debug") == 0)
m_networkDebug = ::atoi(value) == 1;
}
@@ -224,6 +227,11 @@ unsigned int CConf::getNetworkStartup() const
return m_networkStartup;
}
unsigned int CConf::getNetworkInactivityTimeout() const
{
return m_networkInactivityTimeout;
}
bool CConf::getNetworkDebug() const
{
return m_networkDebug;