00001 #include <signal.h>
00002 #include <StdoutLog.h>
00003
00004 #include "SlaveHandler.h"
00005 #include "SlaveSocket.h"
00006
00007
00008 int main()
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 }