1 // **********************************************************************
3 // Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
5 // This copy of Ice is licensed to you under the terms described in the
6 // ICE_LICENSE file included in this distribution.
8 // **********************************************************************
15 class HelloServer
: public Ice::Application
19 virtual int run(int, char*[]);
23 main(int argc
, char* argv
[])
26 return app
.main(argc
, argv
, "config.server");
30 HelloServer::run(int argc
, char* argv
[])
34 cerr
<< appName() << ": too many arguments" << endl
;
38 Ice::ObjectAdapterPtr adapter
= communicator()->createObjectAdapter("Hello");
39 Demo::HelloPtr hello
= new HelloI
;
40 adapter
->add(hello
, communicator()->stringToIdentity("hello"));
42 communicator()->waitForShutdown();