diff options
author | Marc Laukien <marc@zeroc.com> | 2001-09-28 19:24:59 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2001-09-28 19:24:59 +0000 |
commit | 814a0caf9df6989962b8e0224022633831af6382 (patch) | |
tree | 85e2e915e187a709dd4a30db450d990a63180bd7 /cpp/demo/Ice/nested/Server.cpp | |
parent | win update (diff) | |
download | ice-814a0caf9df6989962b8e0224022633831af6382.tar.bz2 ice-814a0caf9df6989962b8e0224022633831af6382.tar.xz ice-814a0caf9df6989962b8e0224022633831af6382.zip |
initial nested demo (does not work yet)
Diffstat (limited to 'cpp/demo/Ice/nested/Server.cpp')
-rw-r--r-- | cpp/demo/Ice/nested/Server.cpp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/cpp/demo/Ice/nested/Server.cpp b/cpp/demo/Ice/nested/Server.cpp new file mode 100644 index 00000000000..a1ffc4e2624 --- /dev/null +++ b/cpp/demo/Ice/nested/Server.cpp @@ -0,0 +1,40 @@ +// ********************************************************************** +// +// Copyright (c) 2001 +// MutableRealms, Inc. +// Huntsville, AL, USA +// +// All Rights Reserved +// +// ********************************************************************** + +#include <Ice/Application.h> +#include <NestedI.h> + +using namespace std; +using namespace Ice; + +class NestedServer : public Application +{ +public: + + int run(int, char*[]); +}; + +int +main(int argc, char* argv[]) +{ + NestedServer app; + return app.main(argc, argv, "config"); +} + +int +NestedServer::run(int argc, char* argv[]) +{ + ObjectAdapterPtr adapter = communicator()->createObjectAdapter("NestedServerAdapter"); + NestedPrx self = NestedPrx::uncheckedCast(adapter->createProxy("nestedServer")); + adapter->add(new NestedI(self), "nestedServer"); + adapter->activate(); + communicator()->waitForShutdown(); + return EXIT_SUCCESS; +} |