![]() |
slave.cpp File Reference#include <signal.h> #include <StdoutLog.h> #include "SlaveHandler.h" #include "SlaveSocket.h" Include dependency graph for slave.cpp: ![]() Go to the source code of this file.
Function Documentation
Definition at line 8 of file slave.cpp. References SlaveHandler::GetRemoteHost(), SlaveHandler::GetRemotePort(), SlaveHandler::LoadConfig(), and SlaveHandler::SaveConfig(). 00009 { 00010 StdoutLog log; 00011 SlaveHandler h(&log); 00012 h.LoadConfig(); 00013 h.SaveConfig(); 00014 SlaveSocket s(h); 00015 signal(SIGPIPE, SIG_IGN); 00016 s.SetConnectionRetry(-1); 00017 s.SetConnectTimeout(100); 00018 #ifdef ENABLE_RECONNECT 00019 s.SetReconnect(); 00020 #endif 00021 s.EnableSSL(); 00022 s.Open(h.GetRemoteHost(), h.GetRemotePort()); 00023 h.Add(&s); 00024 while (true) 00025 { 00026 h.Select(1,0); 00027 } 00028 }
|