Archived
This forum has been archived. Please start a new discussion on GitHub.
set config properties w/o config file
dkey
in Help Center
hi,
I couldn't find an answer to this question in the forum.
is there any way to set configuration options (which are normally done in the config file) directly in code?
regards,
dkey
I couldn't find an answer to this question in the forum.
is there any way to set configuration options (which are normally done in the config file) directly in code?
regards,
dkey
0
Comments
-
dkey wrote:hi,
I couldn't find an answer to this question in the forum.
is there any way to set configuration options (which are normally done in the config file) directly in code?
regards,
dkey
Yes, you can create a Ice::Properties instance and fill it with whatever values you like. Then create a communicator with the properties instance.
For example,
Ice::PropertiesPtr properties = Ice::createProperties();
properties->setProperty("Ice.Trace.Network", "1");
Ice::CommunicatorPtr communicator = Ice::initializeWithProperties(argc, argv, properties);
Best Regards, Matthew0
