--- projects/cms/source/host/c++/Config.cpp 2001/02/26 14:59:54 1.3 +++ 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 @@ -151,7 +153,61 @@ int Config::destroyHeartbeat(){ } // 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(){ // ask smallnet to make a connection to the filtermanager so we can get some config // details @@ -202,6 +258,8 @@ int Config::chatConfig(){ std::cout << "Config::chatConfig::FILELIST\n"; } fileList = net->heartBeatSend("FILELIST"); + + fQDN = net->heartBeatSend("FQDN"); // now send the properties we want