--- projects/cms/source/host/c++/Config.cpp 2001/03/01 20:10:53 1.4 +++ projects/cms/source/host/c++/Config.cpp 2001/03/05 12:41:06 1.5 @@ -34,7 +34,9 @@ Config::Config( string serverName, int serverPort, int propertyNames[1] = "TCPUpdateTime"; propertyNames[2] = "FilterRetryTime"; propertyNames[3] = "ConfigRetryTime"; - numProperties = 4; + propertyNames[4] = "AVERAGERUpdateTime"; + propertyNames[5] = "MAXTCPFilterRetries"; + numProperties = 5; // read the Chat dialog we 'expect' to have with the config // manager from disk. This is a new idea so that the client @@ -150,6 +152,60 @@ int Config::destroyHeartbeat(){ net->closeHeartBeatConnection(); } // destroyHeartBeat + +int Config::chatHeartBeat(){ + + string response; + + response = net->heartBeatSend("HEARTBEAT"); + if ( response != "OK" ){ + // something went wrong + return -1; + if ( debug == 1 ){ + std::cout << "Config::chatHeartBeat::ERROR in HEARTBEAT\n"; + } + } + + response = net->heartBeatSend("CONFIG"); + if ( response != "OK" ){ + // something went wrong + return -1; + if ( debug == 1 ){ + std::cout << "Config::chatHeartBeat::ERROR in CONFIG\n"; + } + } + + response = net->heartBeatSend(fileList); + if ( response != "OK" ){ + // something went wrong + return -1; + if ( debug == 1 ){ + std::cout << "Config::chatHeartBeat::ERROR in fileList\n"; + } + } + + response = net->heartBeatSend(lastModified); + if ( response != "OK" ){ + // something went wrong + return -1; + if ( debug == 1 ){ + std::cout << "Config::chatHeartBeat::ERROR in lastModified\n"; + } + } + + response = net->heartBeatSend("ENDHEARTBEAT"); + if ( response != "OK" ){ + // something went wrong + return -1; + if ( debug == 1 ){ + std::cout << "Config::chatHeartBeat::ERROR in ENDHEARTBEAT\n"; + } + } + + // seems ok to me + return 0; + +} // chat Heart Beat int Config::establishConfig(){