![]() |
small6.cpp File Reference#include <stdio.h> #include <signal.h> #include <ListenSocket.h> #include <StdoutLog.h> #include "SmallHandler.h" #include "SmallSocket.h" Include dependency graph for small6.cpp: ![]() Go to the source code of this file.
Define Documentation
Definition at line 27 of file small6.cpp.
Function Documentation
Definition at line 69 of file small6.cpp. References SmallHandler::Load(), m_quit, SmallHandler::SecTick(), and siginit(). 00070 { 00071 time_t t = time(NULL); 00072 time_t osec = t; 00073 SmallHandler h; 00074 ListenSocket<SmallSocket> l(h); 00075 StdoutLog log; 00076 00077 h.RegStdLog(&log); 00078 srandom(time(NULL)); 00079 siginit(); 00080 00081 l.SetIpv6(true); 00082 if (l.Bind(4441)) 00083 { 00084 exit(-1); 00085 } 00086 h.Add(&l); 00087 h.Load(); 00088 while (!m_quit) 00089 { 00090 h.Select(1,0); 00091 t = time(NULL); 00092 if (t != osec) 00093 { 00094 h.SecTick(t); 00095 osec = t; 00096 } 00097 } 00098 }
Definition at line 58 of file small6.cpp. References sighup(), sigint(), sigpipe(), sigusr1(), and sigusr2(). 00059 { 00060 signal(SIGINT, (__sighandler_t)sigint); 00061 signal(SIGHUP, (__sighandler_t)sighup); 00062 signal(SIGUSR1, (__sighandler_t)sigusr1); 00063 signal(SIGUSR2, (__sighandler_t)sigusr2); 00064 signal(SIGPIPE, (__sighandler_t)sigpipe); 00065 }
Variable Documentation
Definition at line 30 of file small6.cpp.
|