AMQPConnection::isConnected
(PECL amqp >= Unknown)
AMQPConnection::isConnected — Determine if the AMQPConnection object is connected to the broker.
Beschreibung
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.
Parameter-Liste
Diese Funktion hat keine Parameter.
Rückgabewerte
Returns true if connected, false otherwise
Beispiele
Beispiel #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";
}
?>
There are no user contributed notes for this page.
