AMQPConnection
PHP Manual

AMQPConnection::setTimeout

(Bir sürüm bilgisi bulunamadı; sadece SVN'de olabilir.)

AMQPConnection::setTimeoutSet the timeout.

Açıklama

public bool AMQPConnection::setTimeout ( float $timeout )

Set the amount of time, in seconds, after which this instance of an AMQPConnection object times out a request to the broker. Setting this value will override the default value specified by the amqp.timeout INI setting. To specify a timeout of 500ms, simply pass in 0.5.

Değiştirgeler

timeout

The timeout used to connect to the AMQP broker.

Dönen Değerler

Başarı durumunda TRUE, başarısızlık durumunda FALSE döner.

Hatalar/İstisnalar

Throws an AMQPConnectionException if timeout is longer less than 0.

Örnekler

Örnek 1 AMQPConnection::setTimeout() example

<?php

/* Create a new connection */
$cnn = new AMQPConnection();

// set the timeout
$cnn->setTimeout(5672);

?>


AMQPConnection
PHP Manual