Home Help Center

IcePHP

Hello, I'm using IcePHP and I have to put a timeout in an operation.How can I do that?I try to find it in the manual but only appears examples for Java and C.The source code is this:

$p=$ICE->stringToProxy("drupal:tcp -h 127.0.0.1 -p 10040");
$subs=$p->ice_checkedCast("::Management:: Drupal");
$answer=$subs->operation();

Thanks

Comments

  • marcmarc FloridaAdministrators, ZeroC Staff Marc LaukienOrganization: ZeroC, Inc.Project: The Internet Communications Engine ZeroC Staff
    For example, you could use:

    $p=$ICE->stringToProxy("drupal:tcp -t timeout -h 127.0.0.1 -p 10040");

    Alternatively, you could also override all timeouts with the Ice.Override.Timeout and Ice.Override.ConnectTimeout properties.
  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi,

    You can also set a timeout in your code using the ice_timeout function:
    $timeout = 2000;
    $p=$p->ice_timeout($timeout);
    
    Take care,
    - Mark
Sign In or Register to comment.