|
|
|
|||||
|
"Client <- C1 -> Router/Glacier2 -- C2 -> Server(s)
<- C3 --" my doubt just in client (one machine); I create adapter with router and add several object in the adapter,then another executable program which also run in the client can not touch the objects because of I can not know the adapter's ports-settings Accessing a proxy through character string "object:default -p ????" Last edited by leo : 04-09-2008 at 12:26 AM. |
|
|||||
|
thanks for reply!
then i use communicator()->stringtoproxy("object:tcp -p 10000"),does it resolve the the string like that "object:tcp -h 127.0.0.1 -p 10000"? if yes, My system's framework is that : client2 -> client1 -> router/glaciser ->server ↓ *************↑ ------------------- A server object proxy just leave in client1's care (the proxy is stored in an Ice object that reside in client1's OA);client2 will get the proxy for a while and communicate directly with server object; my question is "how to use client2's communicator that with Glaciser2/router to get the proxy?" Last edited by leo : 04-27-2008 at 01:12 PM. |
|
||||||
|
Hi Leo
Not sure if i understand well your problem. You have two client applications in the same machine and you want C2 be able to call C1, also C2 do not know C1 endpoints. Is the above sentence right? If both clients are intended to run always in the same machine, i think the simple solution can be that C1 write the endpoints it use to some file when start and C2 read this on startup. If you want C1 and C2 to be able to run in different machines, you can use indirect proxies better. For example C1 can register a well know object with IceGrid on startup and C2 create a proxy from a well know id that would point to the correct object. Without much details of what you are trying to archive is difficult to give you better advice. Hope this help |
|
|||||
|
thank you for your help!
give me try; Another problem is that: communicator that with router will resolve "-h 127.0.0.1" like Glaciser2 server IP,not localhost; So ,I can't request Localhost IO's proxy by communicator->StringToProxy("ObjectID:default -p portNo") function ! Last edited by leo : 04-27-2008 at 02:17 PM. |
|
|||||
|
sorry ,I take a mistake above!
communicator->StringToProxy("ObjectID:default -p portNo") function can find out localhost IO; but it cause another problem: the communicator with router how to request a IO's proxy ? How to find out localhost's and server's IO just by only a function that communicator->StringToProxy("ObjectID:default -p portNo") ? |
|
||||||
|
I'm sorry, but your description is not very clear. However, if I understand you correctly the issue is that you want client1 to talk directly with client2
I imagine that the problem you've run into is that then client1 tries to talk with client2, the request is routed through glacier2 (assuming that you have set Ice.Default.Locator, as the manual directs you to do). The solution here is to clear the router on the proxy by calling ice_router. Something like: Code:
ObjectPrx obj = ...; // some proxy that refers to client2. obj = obj->ice_router(0); // Clear the router. |
|
|||||
|
thanks for reply.
The problem has resolved! I just want to know : how the ICE's core run? The function of communicator()->StringToProxy("ObjectID:default -p portNo") can get server IO,also successful to get client IO without IP setting. why?(the server and the client have resided in different machine and the communicator have been set Ice.Default.Router) To this question is because my application run slowly when I use router. |
![]() |
| 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 |
| how to know which port the adapter is using? | nyingchi | Help Center | 7 | 07-07-2008 04:29 PM |
| Adapter Factories | zhi | Help Center | 4 | 01-22-2007 08:46 PM |
| How to tell (in C++) when an adapter is deactivated | mefoster | Help Center | 8 | 10-06-2006 10:24 AM |
| one adapter or many | shimrod | Help Center | 2 | 11-07-2005 07:56 AM |
| Adapter Reactivation | Mr.Freeze | Help Center | 3 | 01-26-2004 09:34 AM |