summaryrefslogtreecommitdiff
path: root/cpp/demo/Ice/callback/Client.cpp
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2002-05-30 18:34:53 +0000
committerMarc Laukien <marc@zeroc.com>2002-05-30 18:34:53 +0000
commit5939d6dc436bb7d81b8a950551679490cffcdb9e (patch)
tree8b834d177ced221738ee1838b8cf8bfd2827b1ed /cpp/demo/Ice/callback/Client.cpp
parentmore Glacier batching (diff)
downloadice-5939d6dc436bb7d81b8a950551679490cffcdb9e.tar.bz2
ice-5939d6dc436bb7d81b8a950551679490cffcdb9e.tar.xz
ice-5939d6dc436bb7d81b8a950551679490cffcdb9e.zip
_ovwt
Diffstat (limited to 'cpp/demo/Ice/callback/Client.cpp')
-rw-r--r--cpp/demo/Ice/callback/Client.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/cpp/demo/Ice/callback/Client.cpp b/cpp/demo/Ice/callback/Client.cpp
index 82d926d84a3..0f9eb23f3fd 100644
--- a/cpp/demo/Ice/callback/Client.cpp
+++ b/cpp/demo/Ice/callback/Client.cpp
@@ -40,6 +40,7 @@ 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";
@@ -82,6 +83,7 @@ CallbackClient::run(int argc, char* argv[])
bool secure = false;
string secureStr = "";
+ string overwrite;
menu();
@@ -102,12 +104,20 @@ CallbackClient::run(int argc, char* argv[])
{
Context context;
context["_fwd"] = "o" + secureStr;
+ if (!overwrite.empty())
+ {
+ context["_ovwt"] = overwrite;
+ }
oneway->initiateCallback(onewayR, context);
}
else if (c == 'O')
{
Context context;
context["_fwd"] = "O" + secureStr;
+ if (!overwrite.empty())
+ {
+ context["_ovwt"] = overwrite;
+ }
batchOneway->initiateCallback(onewayR, context);
}
else if (c == 'd')
@@ -120,6 +130,10 @@ CallbackClient::run(int argc, char* argv[])
{
Context context;
context["_fwd"] = "D" + secureStr;
+ if (!overwrite.empty())
+ {
+ context["_ovwt"] = overwrite;
+ }
batchDatagram->initiateCallback(datagramR, context);
}
else if (c == 'f')
@@ -153,6 +167,19 @@ 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();