[Dev] some questions related to send_and_wait_for function used in retrieval

PingShan Li lipingshan72 at gmail.com
Wed Jul 2 10:45:39 CDT 2008


inside the retrieval script, send_and_wait_for function is used to retrieve
the configuration, for example:

    $responses->{config}   = $cli_protocol->send_and_wait_for( 'get config',
$prompt_regex );

If i understand the function correctly, it will timeout after 30 sec by
default.

For large configuration, 30 sec is not enough, and you can add a third
parameter to this function to change the default timeout.

I wonder if it is good idea to tweak this function so that it will timeout
if it has not received any data after 30 sec. The timeout will not be
triggered or will be reset if ziptie is currently receiving data. By doing
this, this function will automatically adapt to handle large configuration
and we still have timeout option available.

Thanks

PingShan Li
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ziptie.org/pipermail/dev/attachments/20080702/eac5a1f7/attachment.html 


More information about the Dev mailing list