Archived
This forum has been archived. Please start a new discussion on GitHub.
createObjectAdapterWithEndpoints problem
Hallo, I am new in IceE. I have a problem with createObjectAdapterWithEndpoints. Here is my code.
//server
Ice::ObjectPtr object = new PingI;
Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("Latency","tcp -h 192.168.250.73 -p 10003" );
adapter->add(object, Ice::stringToIdentity("ping123"));
adapter->activate();
communicator->waitForShutdown();
return EXIT_SUCCESS;
//client
string proxy = "ping123::tcp -h 192.168.250.73 -p 10003";
Ice::ObjectPrx base = communicator->stringToProxy(proxy);
PingPrx ping = PingPrx::checkedCast(base);
if(!ping)
{
fprintf(stderr, "%s: invalid proxy\n", argv[0]);
return EXIT_FAILURE;
}
while i run the client, error will occour. Here is the error messege.
[root@localhost latency2]# ./client
../../src/TcpTransport/EndpointFactory.cpp:40: Ice::EndpointParseException:
error while parsing endpoint `'
which part of code i should edit.
//server
Ice::ObjectPtr object = new PingI;
Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("Latency","tcp -h 192.168.250.73 -p 10003" );
adapter->add(object, Ice::stringToIdentity("ping123"));
adapter->activate();
communicator->waitForShutdown();
return EXIT_SUCCESS;
//client
string proxy = "ping123::tcp -h 192.168.250.73 -p 10003";
Ice::ObjectPrx base = communicator->stringToProxy(proxy);
PingPrx ping = PingPrx::checkedCast(base);
if(!ping)
{
fprintf(stderr, "%s: invalid proxy\n", argv[0]);
return EXIT_FAILURE;
}
while i run the client, error will occour. Here is the error messege.
[root@localhost latency2]# ./client
../../src/TcpTransport/EndpointFactory.cpp:40: Ice::EndpointParseException:
error while parsing endpoint `'
which part of code i should edit.
0
Comments
-
Welcome to the forum!
Please update your signature as described in this announcement regarding our support policy on the forum.
Take care,
- Mark0 -
Thanks mes.
I had upgrade my signature0 -
thanks, i resolve my problem0