#include <stdio.h>#include <ListenSocket.h>#include "InSocket.h"#include "ProxyHandler.h"#include <signal.h>#include <StdoutLog.h>Include dependency graph for stprog.cpp:

Go to the source code of this file.
Defines | |
| #define | DEB(x) |
Functions | |
| void | sigint (int s) |
| void | sighup (int s) |
| void | sigusr1 (int s) |
| void | sigusr2 (int s) |
| void | sigpipe (int s) |
| void | siginit (void) |
| void | run () |
| int | main (int argc, char *argv[]) |
Variables | |
| static int | m_quit = 0 |
|
|
Definition at line 29 of file stprog.cpp. |
|
||||||||||||
|
Definition at line 96 of file stprog.cpp. References run(), and siginit().
|
|
|
Definition at line 71 of file stprog.cpp. References m_quit, and ProxyHandler::ViewSockets(). Referenced by main(). 00072 { 00073 size_t sz = 0; 00074 ProxyHandler h; 00075 StdoutLog log; 00076 h.RegStdLog(&log); 00077 ListenSocket<InSocket> l(h); 00078 00079 if (l.Bind( 80 )) 00080 { 00081 exit(-1); 00082 } 00083 h.Add(&l); 00084 while (!m_quit) 00085 { 00086 h.Select(1, 0); 00087 if (h.GetCount() != sz) 00088 { 00089 sz = h.GetCount(); 00090 h.ViewSockets(); 00091 } 00092 } 00093 }
|
|
|
Definition at line 42 of file stprog.cpp. Referenced by siginit().
|
|
|
Definition at line 60 of file stprog.cpp. References sighup(), sigint(), sigpipe(), sigusr1(), and sigusr2(). Referenced by main(). 00061 { 00062 signal(SIGINT, (__sighandler_t)sigint); 00063 signal(SIGHUP, (__sighandler_t)sighup); 00064 signal(SIGUSR1, (__sighandler_t)sigusr1); 00065 signal(SIGUSR2, (__sighandler_t)sigusr2); 00066 signal(SIGPIPE, (__sighandler_t)sigpipe); 00067 }
|
|
|
Definition at line 36 of file stprog.cpp. Referenced by siginit().
|
|
|
Definition at line 56 of file stprog.cpp. Referenced by siginit().
|
|
|
Definition at line 48 of file stprog.cpp. Referenced by siginit().
|
|
|
Definition at line 52 of file stprog.cpp. Referenced by siginit().
|
|
|
Definition at line 32 of file stprog.cpp. |
1.3.6
|
|