downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

AMQPConnection::reconnect> <AMQPConnection::getVhost
[edit] Last updated: Fri, 17 May 2013

view this page in

AMQPConnection::isConnected

(PECL amqp >= Unknown)

AMQPConnection::isConnectedDetermine if the AMQPConnection object is connected to the broker.

Descrizione

public bool AMQPConnection::isConnected ( void )

This method will check whether the connection to the AMQP broker is still valid. It does so by checking the return status of the last command.

Elenco dei parametri

Questa funzione non contiene parametri.

Valori restituiti

Returns true if connected, false otherwise

Esempi

Example #1 AMQPConnection::isConnected() example

<?php

/* Create a new connection */
$conn = new AMQPConnection();
$conn->connect();

/* Check that connection is working */
if ($conn->isConnected()) {
    echo 
"Connected to the broker \o/";
}
else {
    echo 
"Cannot connect to the broker";
}

?>



add a note add a note User Contributed Notes AMQPConnection::isConnected - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites