diff options
Diffstat (limited to 'TAO/examples/Simple/chat/server.cpp')
-rw-r--r-- | TAO/examples/Simple/chat/server.cpp | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/TAO/examples/Simple/chat/server.cpp b/TAO/examples/Simple/chat/server.cpp new file mode 100644 index 00000000000..f459c40a8df --- /dev/null +++ b/TAO/examples/Simple/chat/server.cpp @@ -0,0 +1,48 @@ +// $Id$ + +// =========================================================== +// +// +// = LIBRARY +// TAO/tests/Simple/chat +// +// = FILENAME +// server.cpp +// +// = DESCRIPTION +// Entry point for the chat server. +// +// = AUTHOR +// Pradeep Gore <pradeep@cs.wustl.edu> +// +// =========================================================== + +#include "Server_i.h" + +int +main (int argc, char *argv[]) +{ + + try + { + Server_i server_i; + + int ret = server_i.init (argc, argv); + if (ret != 0) + ACE_ERROR_RETURN ((LM_ERROR, + "\n error in init.\n"), + 1); + ret = server_i.run (); + if (ret != 0) + ACE_ERROR_RETURN ((LM_ERROR, + "\n error in run.\n"), + 1); + } + catch (const CORBA::Exception& ex) + { + ex._tao_print_exception ("server::main\t\n"); + return 1; + } + + return 0; +} |