summaryrefslogtreecommitdiff
path: root/TAO/tests/Simple/chat/Server.cpp
blob: 5dffcedf7c5271b5f9ef9a515fd8cc2a5c2afb6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// $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[])
{
  Server_i server_i("chat.ior");

  CORBA::Environment TAO_TRY_ENV;

  TAO_TRY
    {
     ACE_OS::printf("Running chat server...");

     if (server_i.init(argc, argv, TAO_TRY_ENV) != 0 ||
	 server_i.run(TAO_TRY_ENV) != 0)
	 {
	    ACE_OS::printf("\n error in init or run.\n");
	   return 1;
	 }
    }
  TAO_CATCHANY
    {
      TAO_TRY_ENV.print_exception ("server::main\t\n");
      return 1;
    }

  TAO_ENDTRY;

  return 0;
}