L:/channel/cvm/src/cvm.cpp

Go to the documentation of this file.
00001 
00002 // Copyright (c) 2005, 2006 Yigong Liu
00003 // Permission to use, copy, modify, distribute and sell this software for any 
00004 //     purpose is hereby granted without fee, provided that the above copyright 
00005 //     notice appear in all copies and that both that copyright notice and this 
00006 //     permission notice appear in supporting documentation.
00007 // The author makes no representations about the 
00008 //     suitability of this software for any purpose. It is provided "as is" 
00009 //     without express or implied warranty.
00011 
00012 /*
00013 ** cvm - the generic runtime environment for channel based apps
00014 */
00015 
00016 #include "ace/OS_main.h"
00017 #include "ace/Service_Config.h"
00018 #include "ace/Reactor.h"
00019 #include "ace/ACE.h"
00020 #include "ace/Auto_Ptr.h"
00021 #include "ace/OS_NS_string.h"
00022 #include "ace/OS_NS_stdio.h"
00023 #include <iostream>
00024 #include "ace/Thread_Manager.h"
00025 
00026 using namespace std;
00027 
00028 
00029 int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) {
00030   ACE::debug('y');
00031 
00032   ACE_LOG_MSG->open
00033     (argv[0], ACE_Log_Msg::SYSLOG, ACE_TEXT (argv[0]));
00034   ACE_LOG_MSG->set_flags (ACE_Log_Msg::STDERR);
00035 
00036   ACE_STATIC_SVC_REGISTER (ACE_Service_Manager);
00037 
00038   ACE_Service_Config::open
00039     (argc, argv, ACE_TEXT (argv[0]), 0);
00040 
00041   ACE_DEBUG((LM_DEBUG, "main thread start listening for incoming conn...\n"));
00042 
00043   ACE_Reactor::instance ()->run_reactor_event_loop ();
00044   return 0;
00045 }

Generated on Mon Feb 27 19:59:22 2006 for channel by  doxygen 1.4.6-NO