diff options
Diffstat (limited to 'cpp/test/Ice/objects/Server.cpp')
-rw-r--r-- | cpp/test/Ice/objects/Server.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/cpp/test/Ice/objects/Server.cpp b/cpp/test/Ice/objects/Server.cpp index c329c1c3049..e9d357682e4 100644 --- a/cpp/test/Ice/objects/Server.cpp +++ b/cpp/test/Ice/objects/Server.cpp @@ -16,7 +16,17 @@ using namespace std; int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { - string endpts("tcp -p 12345 -t 2000"); + Ice::PropertiesPtr properties = communicator->getProperties();
+
+ string protocol = properties->getProperty("Ice.Protocol");
+
+ if (protocol.empty())
+ {
+ protocol = "tcp";
+ }
+
+ string endpts = protocol + " -p 12345 -t 2000";
+
Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("TestAdapter", endpts); InitialPtr initial = new InitialI(adapter); adapter->add(initial, "initial"); |