|
|
|
||||||
|
This means that your server is not running, or it is not running on the specified host/port.
Again, tracing will give you more information as to what address the client exactly tries to connect to, as well as what address the server listens to. Run both the client and the server with --Ice.Trace.Network=3. |
|
|||||
|
code here,
[server code]
int argc = 0; Ice::PropertiesPtr properties = Ice::createProperties(); properties->setProperty("Hello.Endpoints", "tcp -p 10000"); properties->setProperty("Ice.Trace.Network", "3"); communicator = Ice::initializeWithProperties(argc, 0, properties); log = new LogI; communicator->setLogger(log); adapter = communicator->createObjectAdapter("Hello"); properties->setProperty("Ice.Trace.Network", "3"); Ice::ObjectPrx obj = communicator->stringToProxy("Player:tcp -p 10001"); PlayerPrx::uncheckedCast(obj); [client ode:] PropertiesPtr properties = _communicator->getProperties(); properties->setProperty("Ice.Trace.Network", "3"); Ice::ObjectPrx obj = _communicator->stringToProxy("hello:tcp -p 10000"); _proxy = HelloPrx::uncheckedCast(obj); _currentProxy = _proxy; properties->setProperty("Ice.Trace.Network", "3"); properties->setProperty("Player.Endpoints", "tcp -p 10001"); ObjectAdapterPtr adapter = _communicator->createObjectAdapter("Player"); adapter->add(new PlayerI(), stringToIdentity("Player")); adapter->activate(); _PlayerProxy = PlayerPrx::uncheckedCast( adapter->createProxy(stringToIdentity("Player"))); what's problem with it? |
|
|||||
|
code here,
[server code]
int argc = 0; Ice::PropertiesPtr properties = Ice::createProperties(); properties->setProperty("Hello.Endpoints", "tcp -p 10000"); properties->setProperty("Ice.Trace.Network", "3"); communicator = Ice::initializeWithProperties(argc, 0, properties); log = new LogI; communicator->setLogger(log); adapter = communicator->createObjectAdapter("Hello"); properties->setProperty("Ice.Trace.Network", "3"); Ice::ObjectPrx obj = communicator->stringToProxy("Player:tcp -p 10001"); PlayerPrx::uncheckedCast(obj); [client ode:] PropertiesPtr properties = _communicator->getProperties(); properties->setProperty("Ice.Trace.Network", "3"); Ice::ObjectPrx obj = _communicator->stringToProxy("hello:tcp -p 10000"); _proxy = HelloPrx::uncheckedCast(obj); _currentProxy = _proxy; properties->setProperty("Ice.Trace.Network", "3"); properties->setProperty("Player.Endpoints", "tcp -p 10001"); ObjectAdapterPtr adapter = _communicator->createObjectAdapter("Player"); adapter->add(new PlayerI(), stringToIdentity("Player")); adapter->activate(); _PlayerProxy = PlayerPrx::uncheckedCast( adapter->createProxy(stringToIdentity("Player"))); what's problem with it? |
|
||||||
|
Again, please have a look at the trace output for both the client and the server, then you will find out what the problem is. You should not set any special logger for that, but use the standard logger that just logs to standard output.
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| No problem in Vc7.0 client and Vc7.0 Server | zhoubin | Help Center | 0 | 11-24-2006 03:27 AM |
| problem with server connect client(in a private network) | hero107 | Help Center | 4 | 02-21-2006 03:17 AM |
| problem with server connect client | hero107 | Help Center | 3 | 02-20-2006 08:01 AM |
| Encoding Problem about Chinese, client compiled by Java, server compiled by C++ | richardma | Help Center | 6 | 12-21-2005 12:00 AM |
| server communicate with client without client's request | chunlin | Help Center | 1 | 09-12-2003 08:18 AM |