diff options
Diffstat (limited to 'cpp/demo/Ice/bidir/Server.cpp')
-rw-r--r-- | cpp/demo/Ice/bidir/Server.cpp | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/cpp/demo/Ice/bidir/Server.cpp b/cpp/demo/Ice/bidir/Server.cpp deleted file mode 100644 index daecdc0d9d4..00000000000 --- a/cpp/demo/Ice/bidir/Server.cpp +++ /dev/null @@ -1,57 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#include <Ice/Ice.h> -#include <CallbackI.h> - -using namespace std; -using namespace Demo; - -class CallbackServer : public Ice::Application -{ -public: - - virtual int run(int, char*[]); -}; - -int -main(int argc, char* argv[]) -{ - CallbackServer app; - return app.main(argc, argv, "config.server"); -} - -int -CallbackServer::run(int argc, char*[]) -{ - if(argc > 1) - { - cerr << appName() << ": too many arguments" << endl; - return EXIT_FAILURE; - } - - Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("Callback.Server"); - CallbackSenderIPtr sender = new CallbackSenderI(communicator()); - adapter->add(sender, communicator()->stringToIdentity("sender")); - adapter->activate(); - - sender->start(); - try - { - communicator()->waitForShutdown(); - } - catch(...) - { - sender->destroy(); - throw; - } - sender->destroy(); - - return EXIT_SUCCESS; -} |