More tests update
[ACE_TAO.git] / TAO / tests / OBV / Simple / Client_i.cpp
blob9a677c602a9a8c946d78891e8dc9334f6619dec9
1 #include "Client_i.h"
2 #include "OBV_impl.h"
4 #include "ace/Get_Opt.h"
5 #include "ace/OS_NS_sys_time.h"
7 int
8 Checkpoint_Client_i::run (const char *name,
9 int argc,
10 ACE_TCHAR *argv[])
12 // Initialize the client (read ior...).
13 if (checkpoint.init (name,argc, argv) == -1)
14 return -1;
16 // Set random seed
17 ACE_Time_Value now (ACE_OS::gettimeofday ());
18 ACE_OS::srand ((unsigned int) now.sec () );
21 try
23 ACE_DEBUG ((LM_DEBUG, "Send some random events:\n"));
25 CORBA::Long value = 64;
26 Event_var t_e (static_cast<Event*> (new Event_impl (value)));
27 t_e->do_print ();
28 checkpoint->put_event (t_e);
30 value = 34;
31 t_e = new Event_impl (value);
32 t_e->do_print ();
33 checkpoint->put_event (t_e);
35 checkpoint->shutdown ();
37 catch (const CORBA::Exception& ex)
39 ex._tao_print_exception ("\n Exception in RMI");
40 return -1;
43 return 0;
46 // Constructor.
47 Checkpoint_Client_i::Checkpoint_Client_i (void)
49 //no-op
52 //Destructor.
53 Checkpoint_Client_i::~Checkpoint_Client_i (void)
55 //no-op