summaryrefslogtreecommitdiff
path: root/cpp/demo/Ice/hello/Client.cpp
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2008-03-06 16:33:31 +1000
committerMichi Henning <michi@zeroc.com>2008-03-06 16:33:31 +1000
commit2740c38d741b10018c66c97acaf67fa9cd9f0a87 (patch)
tree784657f6e99168e15b060f40e88c4a54f5c7e9e8 /cpp/demo/Ice/hello/Client.cpp
parentAnother fix to bug 2395. gacutil can actually do what we need, it's just that... (diff)
parentSquashed commit of the following: (diff)
downloadice-2740c38d741b10018c66c97acaf67fa9cd9f0a87.tar.bz2
ice-2740c38d741b10018c66c97acaf67fa9cd9f0a87.tar.xz
ice-2740c38d741b10018c66c97acaf67fa9cd9f0a87.zip
Merge branch 'master' of ssh://cvs.zeroc.com/home/git/ice
Diffstat (limited to 'cpp/demo/Ice/hello/Client.cpp')
-rw-r--r--cpp/demo/Ice/hello/Client.cpp36
1 files changed, 11 insertions, 25 deletions
diff --git a/cpp/demo/Ice/hello/Client.cpp b/cpp/demo/Ice/hello/Client.cpp
index 10afd89365d..a9bfb0330a9 100644
--- a/cpp/demo/Ice/hello/Client.cpp
+++ b/cpp/demo/Ice/hello/Client.cpp
@@ -17,8 +17,9 @@ class HelloClient : public Ice::Application
{
public:
+ HelloClient();
+
virtual int run(int, char*[]);
- virtual void interruptCallback(int);
private:
@@ -32,6 +33,15 @@ main(int argc, char* argv[])
return app.main(argc, argv, "config.client");
}
+HelloClient::HelloClient() :
+ //
+ // Since this is an interactive demo we don't want any signal
+ // handling.
+ //
+ Application(Ice::NoSignalHandling)
+{
+}
+
int
HelloClient::run(int argc, char* argv[])
{
@@ -41,12 +51,6 @@ HelloClient::run(int argc, char* argv[])
return EXIT_FAILURE;
}
- //
- // Since this is an interactive demo we want the custom interrupt
- // callback to be called when the process is interrupted.
- //
- callbackOnInterrupt();
-
HelloPrx twoway = HelloPrx::checkedCast(
communicator()->propertyToProxy("Hello.Proxy")->ice_twoway()->ice_timeout(-1)->ice_secure(false));
if(!twoway)
@@ -202,24 +206,6 @@ HelloClient::run(int argc, char* argv[])
}
void
-HelloClient::interruptCallback(int)
-{
- try
- {
- communicator()->destroy();
- }
- catch(const IceUtil::Exception& ex)
- {
- cerr << appName() << ": " << ex << endl;
- }
- catch(...)
- {
- cerr << appName() << ": unknown exception" << endl;
- }
- exit(EXIT_SUCCESS);
-}
-
-void
HelloClient::menu()
{
cout <<