1 #include "Echo_Client_i.h"
2 #include "ace/Get_Opt.h"
3 #include "ace/Read_Buffer.h"
4 #include "ace/OS_NS_unistd.h"
6 // This is the interface program that accesses the remote object
9 Echo_Client_i::run (const char *name
,
13 // Initialize the client.
14 if (client_
.init (name
, argc
, argv
) == -1)
23 // Get the input message which has to be displayed.
25 ACE_TEXT ("ECHO? ")));
27 if (ACE_OS::fgets (buf
, sizeof buf
, stdin
) == 0)
30 CORBA::String_var s
= client_
->echo_string (buf
);
33 ACE_TEXT ("\nString echoed by client \n%C\n"),
37 if (client_
.do_shutdown () == 1)
40 catch (const CORBA::Exception
& ex
)
42 ex
._tao_print_exception ("\n Exception in RMI");