diff options
Diffstat (limited to 'ACE/examples/C++NPv2/Reactor_Logging_Server.cpp')
-rw-r--r-- | ACE/examples/C++NPv2/Reactor_Logging_Server.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/ACE/examples/C++NPv2/Reactor_Logging_Server.cpp b/ACE/examples/C++NPv2/Reactor_Logging_Server.cpp new file mode 100644 index 00000000000..b36539c2a6d --- /dev/null +++ b/ACE/examples/C++NPv2/Reactor_Logging_Server.cpp @@ -0,0 +1,29 @@ +/* +** $Id$ +** +** Copyright 2002 Addison Wesley. All Rights Reserved. +*/ + +#include "Reactor_Logging_Server_T.h" +#include "Logging_Acceptor_Ex.h" +#include "ace/Log_Msg.h" + +typedef Reactor_Logging_Server<Logging_Acceptor_Ex> + Server_Logging_Daemon; + +int main (int argc, char *argv[]) +{ + ACE_Reactor reactor; + Server_Logging_Daemon *server; + // Ignore argv[0]... + --argc; ++argv; + ACE_NEW_RETURN (server, + Server_Logging_Daemon (argc, argv, &reactor), + 1); + + if (reactor.run_reactor_event_loop () == -1) + ACE_ERROR_RETURN ((LM_ERROR, "%p\n", + "run_reactor_event_loop()"), 1); + return 0; +} + |