summaryrefslogtreecommitdiff
path: root/cppe/demo
diff options
context:
space:
mode:
Diffstat (limited to 'cppe/demo')
-rw-r--r--cppe/demo/IceE/MFC/server/LogI.h2
-rw-r--r--cppe/demo/IceE/bidir/CallbackI.cpp10
-rw-r--r--cppe/demo/IceE/bidir/CallbackI.h12
-rw-r--r--cppe/demo/IceE/bidir/Client.cpp2
-rwxr-xr-xcppe/demo/IceE/callback/callbackC.dsp8
-rwxr-xr-xcppe/demo/IceE/callback/callbackS.dsp8
-rwxr-xr-xcppe/demo/IceE/hello/helloC.dsp8
-rwxr-xr-xcppe/demo/IceE/hello/helloS.dsp8
-rw-r--r--cppe/demo/IceE/latency/Client.cpp4
-rwxr-xr-xcppe/demo/IceE/latency/latencyS.dsp8
-rw-r--r--cppe/demo/IceE/minimal/config3
-rw-r--r--cppe/demo/IceE/throughput/Client.cpp4
-rw-r--r--cppe/demo/IceE/workqueue/WorkQueue.cpp16
13 files changed, 47 insertions, 46 deletions
diff --git a/cppe/demo/IceE/MFC/server/LogI.h b/cppe/demo/IceE/MFC/server/LogI.h
index 18a160b854c..5ac80a9f637 100644
--- a/cppe/demo/IceE/MFC/server/LogI.h
+++ b/cppe/demo/IceE/MFC/server/LogI.h
@@ -30,6 +30,6 @@ private:
CEdit* _log;
};
-typedef Ice::Handle<LogI> LogIPtr;
+typedef IceUtil::Handle<LogI> LogIPtr;
#endif
diff --git a/cppe/demo/IceE/bidir/CallbackI.cpp b/cppe/demo/IceE/bidir/CallbackI.cpp
index 23cc06bd742..22ec272ba31 100644
--- a/cppe/demo/IceE/bidir/CallbackI.cpp
+++ b/cppe/demo/IceE/bidir/CallbackI.cpp
@@ -24,10 +24,10 @@ CallbackSenderI::CallbackSenderI() :
void
CallbackSenderI::destroy()
{
- Ice::ThreadPtr callbackSenderThread;
+ IceUtil::ThreadPtr callbackSenderThread;
{
- Ice::Monitor<Ice::Mutex>::Lock lock(*this);
+ IceUtil::Monitor<IceUtil::Mutex>::Lock lock(*this);
printf("destroying callback sender\n");
_destroy = true;
@@ -44,7 +44,7 @@ CallbackSenderI::destroy()
void
CallbackSenderI::addClient(const Identity& ident, const Current& current)
{
- Ice::Monitor<Ice::Mutex>::Lock lock(*this);
+ IceUtil::Monitor<IceUtil::Mutex>::Lock lock(*this);
printf("adding client `%s'\n", identityToString(ident).c_str());
@@ -61,11 +61,11 @@ CallbackSenderI::start()
void
CallbackSenderI::run()
{
- Ice::Monitor<Ice::Mutex>::Lock lock(*this);
+ IceUtil::Monitor<IceUtil::Mutex>::Lock lock(*this);
while(!_destroy)
{
- timedWait(Ice::Time::seconds(2));
+ timedWait(IceUtil::Time::seconds(2));
if(!_destroy && !_clients.empty())
{
diff --git a/cppe/demo/IceE/bidir/CallbackI.h b/cppe/demo/IceE/bidir/CallbackI.h
index 91a11c97edc..13cdd2a7858 100644
--- a/cppe/demo/IceE/bidir/CallbackI.h
+++ b/cppe/demo/IceE/bidir/CallbackI.h
@@ -16,9 +16,9 @@
#include <set>
class CallbackSenderI;
-typedef Ice::Handle<CallbackSenderI> CallbackSenderIPtr;
+typedef IceUtil::Handle<CallbackSenderI> CallbackSenderIPtr;
-class CallbackSenderI : public Demo::CallbackSender, public Ice::Monitor<Ice::Mutex>
+class CallbackSenderI : public Demo::CallbackSender, public IceUtil::Monitor<IceUtil::Mutex>
{
public:
@@ -38,12 +38,12 @@ private:
std::set<Demo::CallbackReceiverPrx> _clients;
//
- // We cannot derive CallbackSenderI from Ice::Thread, because
+ // We cannot derive CallbackSenderI from IceUtil::Thread, because
// CallbackSenderI uses Ice::GCShared as base, and
- // Ice::Thread uses Ice::Shared as base. These two base
+ // IceUtil::Thread uses IceUtil::Shared as base. These two base
// classes are not compatible. Therefore we use this helper class.
//
- class CallbackSenderThread : public Ice::Thread
+ class CallbackSenderThread : public IceUtil::Thread
{
public:
@@ -62,7 +62,7 @@ private:
CallbackSenderIPtr _callbackSender;
};
- Ice::ThreadPtr _callbackSenderThread;
+ IceUtil::ThreadPtr _callbackSenderThread;
};
diff --git a/cppe/demo/IceE/bidir/Client.cpp b/cppe/demo/IceE/bidir/Client.cpp
index 34129b28d2d..06330a45ccb 100644
--- a/cppe/demo/IceE/bidir/Client.cpp
+++ b/cppe/demo/IceE/bidir/Client.cpp
@@ -47,7 +47,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
ObjectAdapterPtr adapter = communicator->createObjectAdapter("Callback.Client");
Identity ident;
- ident.name = Ice::generateUUID();
+ ident.name = IceUtil::generateUUID();
ident.category = "";
adapter->add(new CallbackReceiverI, ident);
adapter->activate();
diff --git a/cppe/demo/IceE/callback/callbackC.dsp b/cppe/demo/IceE/callback/callbackC.dsp
index cfd1defd2b7..1c0d9edf15b 100755
--- a/cppe/demo/IceE/callback/callbackC.dsp
+++ b/cppe/demo/IceE/callback/callbackC.dsp
@@ -182,7 +182,7 @@ USERDEP__CALLB="$(ICE_HOME)\bin\slice2cppe.exe" "$(ICE_HOME)\lib\slice.lib"
InputPath=.\Callback.ice
BuildCmds= \
- $(ICE_HOME)\bin\slice2cppe.exe Callback.ice
+ slice2cppe.exe Callback.ice
"Callback.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
@@ -198,7 +198,7 @@ USERDEP__CALLB="$(ICE_HOME)\bin\slice2cppe.exe" "$(ICE_HOME)\lib\sliced.lib"
InputPath=.\Callback.ice
BuildCmds= \
- $(ICE_HOME)\bin\slice2cppe.exe Callback.ice
+ slice2cppe.exe Callback.ice
"Callback.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
@@ -214,7 +214,7 @@ USERDEP__CALLB="$(ICE_HOME)\bin\slice2cppe.exe" "$(ICE_HOME)\lib\sliced.lib"
InputPath=.\Callback.ice
BuildCmds= \
- $(ICE_HOME)\bin\slice2cppe.exe Callback.ice
+ slice2cppe.exe Callback.ice
"Callback.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
@@ -230,7 +230,7 @@ USERDEP__CALLB="$(ICE_HOME)\bin\slice2cppe.exe" "$(ICE_HOME)\lib\slice.lib"
InputPath=.\Callback.ice
BuildCmds= \
- $(ICE_HOME)\bin\slice2cppe.exe Callback.ice
+ slice2cppe.exe Callback.ice
"Callback.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
diff --git a/cppe/demo/IceE/callback/callbackS.dsp b/cppe/demo/IceE/callback/callbackS.dsp
index 6a014362cb1..7a2ef9e3c10 100755
--- a/cppe/demo/IceE/callback/callbackS.dsp
+++ b/cppe/demo/IceE/callback/callbackS.dsp
@@ -190,7 +190,7 @@ USERDEP__CALLB="$(ICE_HOME)\bin\slice2cppe.exe" "$(ICE_HOME)\lib\slice.lib"
InputPath=.\Callback.ice
BuildCmds= \
- $(ICE_HOME)\bin\slice2cppe.exe Callback.ice
+ slice2cppe.exe Callback.ice
"Callback.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
@@ -206,7 +206,7 @@ USERDEP__CALLB="$(ICE_HOME)\bin\slice2cppe.exe" "$(ICE_HOME)\lib\sliced.lib"
InputPath=.\Callback.ice
BuildCmds= \
- $(ICE_HOME)\bin\slice2cppe.exe Callback.ice
+ slice2cppe.exe Callback.ice
"Callback.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
@@ -222,7 +222,7 @@ USERDEP__CALLB="$(ICE_HOME)\bin\slice2cppe.exe" "$(ICE_HOME)\lib\sliced.lib"
InputPath=.\Callback.ice
BuildCmds= \
- $(ICE_HOME)\bin\slice2cppe.exe Callback.ice
+ slice2cppe.exe Callback.ice
"Callback.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
@@ -238,7 +238,7 @@ USERDEP__CALLB="$(ICE_HOME)\bin\slice2cppe.exe" "$(ICE_HOME)\lib\slice.lib"
InputPath=.\Callback.ice
BuildCmds= \
- $(ICE_HOME)\bin\slice2cppe.exe Callback.ice
+ slice2cppe.exe Callback.ice
"Callback.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
diff --git a/cppe/demo/IceE/hello/helloC.dsp b/cppe/demo/IceE/hello/helloC.dsp
index 0755eac1249..84057f51b11 100755
--- a/cppe/demo/IceE/hello/helloC.dsp
+++ b/cppe/demo/IceE/hello/helloC.dsp
@@ -182,7 +182,7 @@ USERDEP__HELLO="$(ICE_HOME)\bin\slice2cppe.exe" "$(ICE_HOME)\lib\slice.lib"
InputPath=.\Hello.ice
BuildCmds= \
- $(ICE_HOME)\bin\slice2cppe.exe Hello.ice
+ slice2cppe.exe Hello.ice
"Hello.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
@@ -198,7 +198,7 @@ USERDEP__HELLO="$(ICE_HOME)\bin\slice2cppe.exe" "$(ICE_HOME)\lib\sliced.lib"
InputPath=.\Hello.ice
BuildCmds= \
- $(ICE_HOME)\bin\slice2cppe.exe Hello.ice
+ slice2cppe.exe Hello.ice
"Hello.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
@@ -214,7 +214,7 @@ USERDEP__HELLO="$(ICE_HOME)\bin\slice2cppe.exe" "$(ICE_HOME)\lib\sliced.lib"
InputPath=.\Hello.ice
BuildCmds= \
- $(ICE_HOME)\bin\slice2cppe.exe Hello.ice
+ slice2cppe.exe Hello.ice
"Hello.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
@@ -230,7 +230,7 @@ USERDEP__HELLO="$(ICE_HOME)\bin\slice2cppe.exe" "$(ICE_HOME)\lib\slice.lib"
InputPath=.\Hello.ice
BuildCmds= \
- $(ICE_HOME)\bin\slice2cppe.exe Hello.ice
+ slice2cppe.exe Hello.ice
"Hello.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
diff --git a/cppe/demo/IceE/hello/helloS.dsp b/cppe/demo/IceE/hello/helloS.dsp
index d42a3042478..9393693b3dd 100755
--- a/cppe/demo/IceE/hello/helloS.dsp
+++ b/cppe/demo/IceE/hello/helloS.dsp
@@ -190,7 +190,7 @@ USERDEP__HELLO="$(ICE_HOME)\bin\slice2cppe.exe" "$(ICE_HOME)\lib\slice.lib"
InputPath=.\Hello.ice
BuildCmds= \
- $(ICE_HOME)\bin\slice2cppe.exe Hello.ice
+ slice2cppe.exe Hello.ice
"Hello.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
@@ -206,7 +206,7 @@ USERDEP__HELLO="$(ICE_HOME)\bin\slice2cppe.exe" "$(ICE_HOME)\lib\sliced.lib"
InputPath=.\Hello.ice
BuildCmds= \
- $(ICE_HOME)\bin\slice2cppe.exe Hello.ice
+ slice2cppe.exe Hello.ice
"Hello.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
@@ -222,7 +222,7 @@ USERDEP__HELLO="$(ICE_HOME)\bin\slice2cppe.exe" "$(ICE_HOME)\lib\sliced.lib"
InputPath=.\Hello.ice
BuildCmds= \
- $(ICE_HOME)\bin\slice2cppe.exe Hello.ice
+ slice2cppe.exe Hello.ice
"Hello.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
@@ -238,7 +238,7 @@ USERDEP__HELLO="$(ICE_HOME)\bin\slice2cppe.exe" "$(ICE_HOME)\lib\slice.lib"
InputPath=.\Hello.ice
BuildCmds= \
- $(ICE_HOME)\bin\slice2cppe.exe Hello.ice
+ slice2cppe.exe Hello.ice
"Hello.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
diff --git a/cppe/demo/IceE/latency/Client.cpp b/cppe/demo/IceE/latency/Client.cpp
index 18b6b002af6..0e3b25248cb 100644
--- a/cppe/demo/IceE/latency/Client.cpp
+++ b/cppe/demo/IceE/latency/Client.cpp
@@ -36,7 +36,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
// Initial ping to setup the connection.
ping->ice_ping();
- Ice::Time tm = Ice::Time::now();
+ IceUtil::Time tm = IceUtil::Time::now();
const int repetitions = 100000;
printf("pinging server %d times (this may take a while)\n", repetitions);
@@ -45,7 +45,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
ping->ice_ping();
}
- tm = Ice::Time::now() - tm;
+ tm = IceUtil::Time::now() - tm;
printf("time for %d pings: %fms\n", repetitions, tm.toMilliSecondsDouble());
printf("time per ping: %fms\n", tm.toMilliSecondsDouble() / repetitions);
diff --git a/cppe/demo/IceE/latency/latencyS.dsp b/cppe/demo/IceE/latency/latencyS.dsp
index 553584aae90..0fc87da8798 100755
--- a/cppe/demo/IceE/latency/latencyS.dsp
+++ b/cppe/demo/IceE/latency/latencyS.dsp
@@ -182,7 +182,7 @@ USERDEP__LATEN="$(ICE_HOME)\bin\slice2cppe.exe" "$(ICE_HOME)\lib\slice.lib"
InputPath=.\Latency.ice
BuildCmds= \
- $(ICE_HOME)\bin\slice2cppe.exe Latency.ice
+ slice2cppe.exe Latency.ice
"Latency.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
@@ -198,7 +198,7 @@ USERDEP__LATEN="$(ICE_HOME)\bin\slice2cppe.exe" "$(ICE_HOME)\lib\sliced.lib"
InputPath=.\Latency.ice
BuildCmds= \
- $(ICE_HOME)\bin\slice2cppe.exe Latency.ice
+ slice2cppe.exe Latency.ice
"Latency.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
@@ -214,7 +214,7 @@ USERDEP__LATEN="$(ICE_HOME)\bin\slice2cppe.exe" "$(ICE_HOME)\lib\sliced.lib"
InputPath=.\Latency.ice
BuildCmds= \
- $(ICE_HOME)\bin\slice2cppe.exe Latency.ice
+ slice2cppe.exe Latency.ice
"Latency.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
@@ -230,7 +230,7 @@ USERDEP__LATEN="$(ICE_HOME)\bin\slice2cppe.exe" "$(ICE_HOME)\lib\slice.lib"
InputPath=.\Latency.ice
BuildCmds= \
- $(ICE_HOME)\bin\slice2cppe.exe Latency.ice
+ slice2cppe.exe Latency.ice
"Latency.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
diff --git a/cppe/demo/IceE/minimal/config b/cppe/demo/IceE/minimal/config
index ec00dc681e1..4c7b25e0aea 100644
--- a/cppe/demo/IceE/minimal/config
+++ b/cppe/demo/IceE/minimal/config
@@ -2,7 +2,8 @@
# The client reads this property to create the reference to the
# "hello" object in the server.
#
-Hello.Proxy=hello:tcp -p 10000
+#Hello.Proxy=hello:tcp -p 10000:udp -p 10000
+Hello.Proxy=hello:
#
# The server creates one single object adapter with the name
diff --git a/cppe/demo/IceE/throughput/Client.cpp b/cppe/demo/IceE/throughput/Client.cpp
index 0b1ff88b91e..9ff8ad955e7 100644
--- a/cppe/demo/IceE/throughput/Client.cpp
+++ b/cppe/demo/IceE/throughput/Client.cpp
@@ -99,7 +99,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
}
while(c != EOF && c == '\n');
- Ice::Time tm = Ice::Time::now();
+ IceUtil::Time tm = IceUtil::Time::now();
const int repetitions = 1000;
if(c == '1' || c == '2' || c == '3' || c == '4')
@@ -327,7 +327,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
}
}
- tm = Ice::Time::now() - tm;
+ tm = IceUtil::Time::now() - tm;
printf("time for %d sequences: %fms\n", repetitions, tm.toMilliSecondsDouble());
printf("time per sequence: %fms\n", tm.toMilliSecondsDouble() / repetitions);
int wireSize = 0;
diff --git a/cppe/demo/IceE/workqueue/WorkQueue.cpp b/cppe/demo/IceE/workqueue/WorkQueue.cpp
index 7669714cfda..d63a2c79b1a 100644
--- a/cppe/demo/IceE/workqueue/WorkQueue.cpp
+++ b/cppe/demo/IceE/workqueue/WorkQueue.cpp
@@ -17,7 +17,7 @@
using namespace std;
-class WorkQueue : public Ice::Thread
+class WorkQueue : public IceUtil::Thread
{
public:
@@ -36,14 +36,14 @@ public:
}
printf("work item: %s\n", item.c_str());
- Ice::ThreadControl::sleep(Ice::Time::seconds(1));
+ IceUtil::ThreadControl::sleep(IceUtil::Time::seconds(1));
}
}
void
add(const string& item)
{
- Ice::Monitor<Ice::Mutex>::Lock lock(_monitor);
+ IceUtil::Monitor<IceUtil::Mutex>::Lock lock(_monitor);
if(_queue.empty())
{
_monitor.notify();
@@ -56,7 +56,7 @@ private:
string
nextItem()
{
- Ice::Monitor<Ice::Mutex>::Lock lock(_monitor);
+ IceUtil::Monitor<IceUtil::Mutex>::Lock lock(_monitor);
while(_queue.empty())
{
_monitor.wait();
@@ -68,11 +68,11 @@ private:
}
- Ice::Monitor<Ice::Mutex> _monitor;
+ IceUtil::Monitor<IceUtil::Mutex> _monitor;
list<string> _queue;
};
-typedef Ice::Handle<WorkQueue> WorkQueuePtr;
+typedef IceUtil::Handle<WorkQueue> WorkQueuePtr;
int
main()
@@ -80,7 +80,7 @@ main()
try
{
WorkQueuePtr h = new WorkQueue();
- Ice::ThreadControl control = h->start();
+ IceUtil::ThreadControl control = h->start();
printf("Pushing work items");
printf("."); fflush(stdout);
h->add("item1");
@@ -98,7 +98,7 @@ main()
printf("Waiting for WorkQueue to terminate\n");
control.join();
}
- catch(const Ice::Exception& ex)
+ catch(const IceUtil::Exception& ex)
{
fprintf(stderr, "%s\n", ex.toString().c_str());
return EXIT_FAILURE;