(PECL yar >= 1.0.0)
Yar_Client::setOpt — ���õ��õ�����
���õ���Զ�̷����һЩ����, ���糬ʱֵ, ������͵�.
name
������: YAR_OPT_PACKAGER, YAR_OPT_PERSISTENT (��Ҫ�����֧��keepalive), YAR_OPT_TIMEOUT, YAR_OPT_CONNECT_TIMEOUT
value
Example #1 Yar_Client::setOpt()ʾ��
<?php
$cient = new Yar_Client("http://host/api/");
//Set timeout to 1s
$client->SetOpt(YAR_OPT_CONNECT_TIMEOUT, 1000);
//Set packager to JSON
$client->SetOpt(YAR_OPT_PACKAGER, "json");
/* call remote service */
$result = $client->some_method("parameter");
?>
�������̵���������ڣ�