summaryrefslogtreecommitdiff
path: root/cppe/demo/IceE/bidir/Server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cppe/demo/IceE/bidir/Server.cpp')
-rw-r--r--cppe/demo/IceE/bidir/Server.cpp78
1 files changed, 0 insertions, 78 deletions
diff --git a/cppe/demo/IceE/bidir/Server.cpp b/cppe/demo/IceE/bidir/Server.cpp
deleted file mode 100644
index 4fe3b3fd912..00000000000
--- a/cppe/demo/IceE/bidir/Server.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-// **********************************************************************
-//
-// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
-//
-// This copy of Ice-E is licensed to you under the terms described in the
-// ICEE_LICENSE file included in this distribution.
-//
-// **********************************************************************
-
-#include <CallbackI.h>
-
-using namespace std;
-using namespace Demo;
-
-int
-run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
-{
- if(argc > 1)
- {
- fprintf(stderr, "%s: too many arguments\n", argv[0]);
- 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;
-}
-
-int
-main(int argc, char* argv[])
-{
- int status;
- Ice::CommunicatorPtr communicator;
-
- try
- {
- Ice::InitializationData initData;
- initData.properties = Ice::createProperties();
- initData.properties->load("config");
- communicator = Ice::initialize(argc, argv, initData);
- status = run(argc, argv, communicator);
- }
- catch(const Ice::Exception& ex)
- {
- fprintf(stderr, "%s\n", ex.toString().c_str());
- status = EXIT_FAILURE;
- }
-
- if(communicator)
- {
- try
- {
- communicator->destroy();
- }
- catch(const Ice::Exception& ex)
- {
- fprintf(stderr, "%s\n", ex.toString().c_str());
- status = EXIT_FAILURE;
- }
- }
-
- return status;
-}