summaryrefslogtreecommitdiff
path: root/cpp/demo/Ice/converter/Server.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2006-05-16 17:46:59 +0000
committerDwayne Boone <dwayne@zeroc.com>2006-05-16 17:46:59 +0000
commit249cdeaf17fc164f395c6d02efd71b3dbe1058ed (patch)
tree513868b9b21f82ea36356db6ef339b5964b25ec6 /cpp/demo/Ice/converter/Server.cpp
parent*** empty log message *** (diff)
downloadice-249cdeaf17fc164f395c6d02efd71b3dbe1058ed.tar.bz2
ice-249cdeaf17fc164f395c6d02efd71b3dbe1058ed.tar.xz
ice-249cdeaf17fc164f395c6d02efd71b3dbe1058ed.zip
Added string converter demo
Diffstat (limited to 'cpp/demo/Ice/converter/Server.cpp')
-rw-r--r--cpp/demo/Ice/converter/Server.cpp37
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;
+}