diff options
author | Mark Spruiell <mes@zeroc.com> | 2010-01-05 20:17:33 -0800 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2010-01-05 20:17:33 -0800 |
commit | cf24e681e8c52cd20d81fe750ff258e67ee65734 (patch) | |
tree | 8411820ce3a257272d6ffa0d3dcdab9ce106609a /cpp/demo/book/lifecycle/Server.cpp | |
parent | Fixed bug 4576 - add NPTL options only on Rhel4 (diff) | |
download | ice-cf24e681e8c52cd20d81fe750ff258e67ee65734.tar.bz2 ice-cf24e681e8c52cd20d81fe750ff258e67ee65734.tar.xz ice-cf24e681e8c52cd20d81fe750ff258e67ee65734.zip |
bug 4495 - clean up book demos
Diffstat (limited to 'cpp/demo/book/lifecycle/Server.cpp')
-rw-r--r-- | cpp/demo/book/lifecycle/Server.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/cpp/demo/book/lifecycle/Server.cpp b/cpp/demo/book/lifecycle/Server.cpp index 88445a1bb4e..317b4388fe1 100644 --- a/cpp/demo/book/lifecycle/Server.cpp +++ b/cpp/demo/book/lifecycle/Server.cpp @@ -14,19 +14,24 @@ using namespace std; using namespace Filesystem; using namespace FilesystemI; -class FilesystemApp : virtual public Ice::Application { +class FilesystemApp : virtual public Ice::Application +{ public: - virtual int run(int, char* []) { + + virtual int run(int, char*[]) + { + // // Terminate cleanly on receipt of a signal // shutdownOnInterrupt(); + // // Create an object adapter. // Ice::ObjectAdapterPtr adapter = - communicator()->createObjectAdapterWithEndpoints( - "SimpleFilesystem", "default -h 127.0.0.1 -p 10000"); + communicator()->createObjectAdapterWithEndpoints("SimpleFilesystem", "default -h 127.0.0.1 -p 10000"); + // // Create the root directory. // DirectoryIPtr root = new DirectoryI; @@ -34,10 +39,12 @@ public: id.name = "RootDir"; adapter->add(root, id); + // // All objects are created, allow client requests now. // adapter->activate(); + // // Wait until we are done. // communicator()->waitForShutdown(); |