Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 10-28-2004
timeguest timeguest is offline
Registered User
 
 
Join Date: Oct 2004
Posts: 16
how to match different request-response in ami call?

Hi, all
I've come into a problem which I think may be encountered by others too. When I use the mechanism of AMI, as ICE's Doc show:
class AMI_callback {
virtual void ice_response(...);
};
AMI_callbackPtr cb = new AMI_callbackI;
model->interpolate_async(cb,grid,0);//first call
model->interpolate_async(cb,grid,0);//call twice

My problem is, how could I match the response and the request of these two calls when there's only one ice_response method?
Insert a serial no into each call's input&output params may be a solution, but is there anything better and more graceful?
Reply With Quote
  #2 (permalink)  
Old 10-28-2004
marc's Avatar
marc marc is offline
ZeroC Staff
 
Name: Marc Laukien
Organization: ZeroC, Inc.
Project: The Internet Communications Engine
 
Join Date: Feb 2003
Location: Florida
Posts: 1,781
You must not reuse an AMI callback object for a new call before the first call has returned. If you do so, all kinds of things can go wrong. Once the first call returns, you can reuse the same object for a new call. In this case, it's also clear which response belongs to which call.

If you must do several calls at the same time without waiting for the response, use a separate AMI callback object for each of these calls.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
fast response of a twoway after a huge batch David Help Center 2 06-26-2006 09:10 AM
response timeout? David Help Center 3 06-21-2006 05:03 AM
How to minimize the response time? rwxybh Help Center 4 01-15-2006 10:25 PM
Routing of request mario Help Center 2 03-08-2005 02:15 PM


All times are GMT -4. The time now is 06:00 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.