summaryrefslogtreecommitdiff
path: root/cppe/demo/IceE/hello/Client.cpp
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2005-08-15 04:51:21 +0000
committerMatthew Newhook <matthew@zeroc.com>2005-08-15 04:51:21 +0000
commit72b68f1bde0437e3636a1cbc6cdce298f09384de (patch)
tree9253552da2008fd64b5694be9d0a80f14ca0d43b /cppe/demo/IceE/hello/Client.cpp
parenthello client wasn't linked with pure client. It also didn't compile if (diff)
downloadice-72b68f1bde0437e3636a1cbc6cdce298f09384de.tar.bz2
ice-72b68f1bde0437e3636a1cbc6cdce298f09384de.tar.xz
ice-72b68f1bde0437e3636a1cbc6cdce298f09384de.zip
hello client wasn't linked with pure client. It also didn't compile if
ICEE_HAS_BATCH was not defined.
Diffstat (limited to 'cppe/demo/IceE/hello/Client.cpp')
-rw-r--r--cppe/demo/IceE/hello/Client.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/cppe/demo/IceE/hello/Client.cpp b/cppe/demo/IceE/hello/Client.cpp
index 2d51fc46aea..e4a31dad3c0 100644
--- a/cppe/demo/IceE/hello/Client.cpp
+++ b/cppe/demo/IceE/hello/Client.cpp
@@ -9,7 +9,7 @@
#include <IceE/IceE.h>
#include <Hello.h>
-
+
using namespace std;
using namespace Demo;
@@ -19,8 +19,10 @@ menu()
printf("usage:\n");
printf("t: send greeting as twoway\n");
printf("o: send greeting as oneway\n");
+#ifdef ICEE_HAS_BATCH
printf("O: send greeting as batch oneway\n");
printf("f: flush all batch requests\n");
+#endif
printf("T: set a timeout\n");
printf("s: shutdown server\n");
printf("x: exit\n");
@@ -47,7 +49,9 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
return EXIT_FAILURE;
}
HelloPrx oneway = HelloPrx::uncheckedCast(twoway->ice_oneway());
+#ifdef ICEE_HAS_BATCH
HelloPrx batchOneway = HelloPrx::uncheckedCast(twoway->ice_batchOneway());
+#endif
int timeout = -1;
@@ -72,6 +76,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
{
oneway->sayHello();
}
+#ifdef ICEE_HAS_BATCH
else if(c == 'O')
{
batchOneway->sayHello();
@@ -80,6 +85,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
{
communicator->flushBatchRequests();
}
+#endif
else if(c == 'T')
{
if(timeout == -1)
@@ -93,8 +99,9 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
twoway = HelloPrx::uncheckedCast(twoway->ice_timeout(timeout));
oneway = HelloPrx::uncheckedCast(oneway->ice_timeout(timeout));
+#ifdef ICEE_HAS_BATCH
batchOneway = HelloPrx::uncheckedCast(batchOneway->ice_timeout(timeout));
-
+#endif
if(timeout == -1)
{
printf("timeout is now switched off\n");