diff options
Diffstat (limited to 'cpp/demo/Ice/converter/Server.cpp')
-rw-r--r-- | cpp/demo/Ice/converter/Server.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/cpp/demo/Ice/converter/Server.cpp b/cpp/demo/Ice/converter/Server.cpp new file mode 100644 index 00000000000..3969ef021e0 --- /dev/null +++ b/cpp/demo/Ice/converter/Server.cpp @@ -0,0 +1,37 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2006 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 <HelloI.h> +#include <Ice/Application.h> + +using namespace std; + +class HelloServer : public Ice::Application +{ +public: + + virtual int run(int, char*[]); +}; + +int +main(int argc, char* argv[]) +{ + HelloServer app; + return app.main(argc, argv, "config.server"); +} + +int +HelloServer::run(int argc, char* argv[]) +{ + Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("Hello"); + adapter->add(new HelloI, communicator()->stringToIdentity("hello")); + adapter->activate(); + communicator()->waitForShutdown(); + return EXIT_SUCCESS; +} |