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 // **********************************************************************
16 run(int argc
, char* argv
[], const Ice::CommunicatorPtr
& communicator
)
18 communicator
->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010:udp");
19 Ice::ObjectAdapterPtr adapter
= communicator
->createObjectAdapter("TestAdapter");
20 adapter
->add(new MyDerivedClassI
, communicator
->stringToIdentity("test"));
23 communicator
->waitForShutdown();
28 main(int argc
, char* argv
[])
31 Ice::CommunicatorPtr communicator
;
35 Ice::InitializationData initData
;
36 initData
.properties
= Ice::createProperties(argc
, argv
);
37 communicator
= Ice::initialize(argc
, argv
, initData
);
38 status
= run(argc
, argv
, communicator
);
40 catch(const Ice::Exception
& ex
)
43 status
= EXIT_FAILURE
;
50 communicator
->destroy();
52 catch(const Ice::Exception
& ex
)
55 status
= EXIT_FAILURE
;