summaryrefslogtreecommitdiff
path: root/cpp/demo/Ice/callback/Client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/demo/Ice/callback/Client.cpp')
-rw-r--r--cpp/demo/Ice/callback/Client.cpp51
1 files changed, 5 insertions, 46 deletions
diff --git a/cpp/demo/Ice/callback/Client.cpp b/cpp/demo/Ice/callback/Client.cpp
index 9c575d49b82..eadafce336f 100644
--- a/cpp/demo/Ice/callback/Client.cpp
+++ b/cpp/demo/Ice/callback/Client.cpp
@@ -39,7 +39,6 @@ menu()
"D: send callback as batch datagram\n"
"f: flush all batch requests\n"
"S: switch secure mode on/off\n"
- "v: set/reset override context field\n"
"s: shutdown server\n"
"x: exit\n"
"?: help\n";
@@ -76,13 +75,10 @@ CallbackClient::run(int argc, char* argv[])
CallbackReceiverPrx twowayR = CallbackReceiverPrx::uncheckedCast(
adapter->createProxy(stringToIdentity("callbackReceiver")));
CallbackReceiverPrx onewayR = CallbackReceiverPrx::uncheckedCast(twowayR->ice_oneway());
-// CallbackReceiverPrx batchOnewayR = CallbackReceiverPrx::uncheckedCast(twowayR->ice_batchOneway());
CallbackReceiverPrx datagramR = CallbackReceiverPrx::uncheckedCast(twowayR->ice_datagram());
-// CallbackReceiverPrx batchDatagramR = CallbackReceiverPrx::uncheckedCast(twowayR->ice_batchDatagram());
bool secure = false;
string secureStr = "";
- string overwrite;
menu();
@@ -95,29 +91,15 @@ CallbackClient::run(int argc, char* argv[])
cin >> c;
if(c == 't')
{
- Context context;
- context["_fwd"] = "t" + secureStr;
- twoway->initiateCallback(twowayR, context);
+ twoway->initiateCallback(twowayR);
}
else if(c == 'o')
{
- Context context;
- context["_fwd"] = "o" + secureStr;
- if(!overwrite.empty())
- {
- context["ovrd"] = overwrite;
- }
- oneway->initiateCallback(onewayR, context);
+ oneway->initiateCallback(onewayR);
}
else if(c == 'O')
{
- Context context;
- context["_fwd"] = "O" + secureStr;
- if(!overwrite.empty())
- {
- context["ovrd"] = overwrite;
- }
- batchOneway->initiateCallback(onewayR, context);
+ batchOneway->initiateCallback(onewayR);
}
else if(c == 'd')
{
@@ -127,9 +109,7 @@ CallbackClient::run(int argc, char* argv[])
}
else
{
- Context context;
- context["_fwd"] = "d";
- datagram->initiateCallback(datagramR, context);
+ datagram->initiateCallback(datagramR);
}
}
else if(c == 'D')
@@ -140,13 +120,7 @@ CallbackClient::run(int argc, char* argv[])
}
else
{
- Context context;
- context["_fwd"] = "D";
- if(!overwrite.empty())
- {
- context["ovrd"] = overwrite;
- }
- batchDatagram->initiateCallback(datagramR, context);
+ batchDatagram->initiateCallback(datagramR);
}
}
else if(c == 'f')
@@ -166,9 +140,7 @@ CallbackClient::run(int argc, char* argv[])
twowayR = CallbackReceiverPrx::uncheckedCast(twowayR->ice_secure(secure));
onewayR = CallbackReceiverPrx::uncheckedCast(onewayR->ice_secure(secure));
-// batchOnewayR = CallbackReceiverPrx::uncheckedCast(batchOnewayR->ice_secure(secure));
datagramR = CallbackReceiverPrx::uncheckedCast(datagramR->ice_secure(secure));
-// batchDatagramR = CallbackReceiverPrx::uncheckedCast(batchDatagramR->ice_secure(secure));
if(secure)
{
@@ -179,19 +151,6 @@ CallbackClient::run(int argc, char* argv[])
cout << "secure mode is now off" << endl;
}
}
- else if(c == 'v')
- {
- if(overwrite.empty())
- {
- overwrite = "some_value";
- cout << "overwrite context field is now `" << overwrite << "'" << endl;
- }
- else
- {
- overwrite.clear();
- cout << "overwrite context field is empty" << endl;
- }
- }
else if(c == 's')
{
twoway->shutdown();