summaryrefslogtreecommitdiff
path: root/cpp/demo/Ice/converter/Client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/demo/Ice/converter/Client.cpp')
-rw-r--r--cpp/demo/Ice/converter/Client.cpp106
1 files changed, 53 insertions, 53 deletions
diff --git a/cpp/demo/Ice/converter/Client.cpp b/cpp/demo/Ice/converter/Client.cpp
index 123ad49dc52..3db03370c4f 100644
--- a/cpp/demo/Ice/converter/Client.cpp
+++ b/cpp/demo/Ice/converter/Client.cpp
@@ -19,12 +19,12 @@ void
menu()
{
cout <<
- "usage:\n"
- "t: send greeting with conversion\n"
- "u: send greeting without conversion\n"
- "s: shutdown server\n"
- "x: exit\n"
- "?: help\n";
+ "usage:\n"
+ "t: send greeting with conversion\n"
+ "u: send greeting without conversion\n"
+ "s: shutdown server\n"
+ "x: exit\n"
+ "?: help\n";
}
int
@@ -34,15 +34,15 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator1, const Ice
EchoPrx echo1 = EchoPrx::checkedCast(communicator1->propertyToProxy(proxyProperty));
if(!echo1)
{
- cerr << argv[0] << ": invalid proxy" << endl;
- return EXIT_FAILURE;
+ cerr << argv[0] << ": invalid proxy" << endl;
+ return EXIT_FAILURE;
}
EchoPrx echo2 = EchoPrx::checkedCast(communicator2->propertyToProxy(proxyProperty));
if(!echo2)
{
- cerr << argv[0] << ": invalid proxy" << endl;
- return EXIT_FAILURE;
+ cerr << argv[0] << ": invalid proxy" << endl;
+ return EXIT_FAILURE;
}
menu();
@@ -52,42 +52,42 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator1, const Ice
char c;
do
{
- try
- {
- cout << "==> ";
- cin >> c;
- if(c == 't')
- {
- string ret = echo1->echoString(greeting);
- cout << "Received (LATIN-1): \"" << IceUtil::escapeString(ret, "") << '\"' << endl;
- }
- else if(c == 'u')
- {
- string ret = echo2->echoString(greeting);
- cout << "Received (LATIN-1): \"" << IceUtil::escapeString(ret, "") << '\"' << endl;
- }
- else if(c == 's')
- {
- echo1->shutdown();
- }
- else if(c == 'x')
- {
- // Nothing to do
- }
- else if(c == '?')
- {
- menu();
- }
- else
- {
- cout << "unknown command `" << c << "'" << endl;
- menu();
- }
- }
- catch(const Ice::Exception& ex)
- {
- cerr << ex << endl;
- }
+ try
+ {
+ cout << "==> ";
+ cin >> c;
+ if(c == 't')
+ {
+ string ret = echo1->echoString(greeting);
+ cout << "Received (LATIN-1): \"" << IceUtil::escapeString(ret, "") << '\"' << endl;
+ }
+ else if(c == 'u')
+ {
+ string ret = echo2->echoString(greeting);
+ cout << "Received (LATIN-1): \"" << IceUtil::escapeString(ret, "") << '\"' << endl;
+ }
+ else if(c == 's')
+ {
+ echo1->shutdown();
+ }
+ else if(c == 'x')
+ {
+ // Nothing to do
+ }
+ else if(c == '?')
+ {
+ menu();
+ }
+ else
+ {
+ cout << "unknown command `" << c << "'" << endl;
+ menu();
+ }
+ }
+ catch(const Ice::Exception& ex)
+ {
+ cerr << ex << endl;
+ }
}
while(cin.good() && c != 'x');
@@ -104,18 +104,18 @@ main(int argc, char* argv[])
try
{
//
- // Create two communicators, one with string converter configured
- // and one without.
- //
+ // Create two communicators, one with string converter configured
+ // and one without.
+ //
Ice::InitializationData initData;
initData.stringConverter = new StringConverterI();
- initData.properties = Ice::createProperties(initData.stringConverter);
- initData.properties->load("config.client");
+ initData.properties = Ice::createProperties(initData.stringConverter);
+ initData.properties->load("config.client");
communicator1 = Ice::initialize(argc, argv, initData);
Ice::InitializationData initData2;
- initData2.properties = Ice::createProperties();
- initData2.properties->load("config.client");
+ initData2.properties = Ice::createProperties();
+ initData2.properties->load("config.client");
communicator2 = Ice::initialize(argc, argv, initData2);
status = run(argc, argv, communicator1, communicator2);