Archived
This forum has been archived. Please start a new discussion on GitHub.
how to set timeout for each call?
Hi there,
I know how to set the connection timeout in the proxy string (i.e. -t parameter); how about each Ice method call? Can I set different timeout value for different calls? So that some calls can have longer timeout but some shorter?
Thanks
Alex
I know how to set the connection timeout in the proxy string (i.e. -t parameter); how about each Ice method call? Can I set different timeout value for different calls? So that some calls can have longer timeout but some shorter?
Thanks
Alex
0
Comments
-
Hi Alex,
You can use a different timeout for each remote invocation, but you'll need to create a new proxy using ice_timeout:int newTimeout = ...; HelloPrx newProxy = (HelloPrx)oldProxy.ice_timeout(newTimeout); newProxy.sayHello();
Note that Ice creates a new connection to the server for each unique endpoint-timeout combination. Remember also that timeouts affect all pending invocations on the same connection.
Hope that helps,
Mark0 -
You can call ice_timeout on a proxy to create a new proxy with a different timeout. Note that the Ice run time uses a separate connection for each distinct timeout value, so you should avoid having dozens or more different timeout values, unless you are willing to use that many connections.
Cheers,
Michi.0