summaryrefslogtreecommitdiff
path: root/trunk/TAO/examples/Simple/chat/server.cpp
blob: f459c40a8dff42a011abce8b645b5db911f5085d (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
// $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;
}