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

search for in the

AMQPConnection::setHost> <AMQPConnection::isConnected
[edit] Last updated: Fri, 17 May 2013

view this page in

AMQPConnection::reconnect

(PECL amqp >= Unknown)

AMQPConnection::reconnectCloses any open connection and creates a new connection with the AMQP broker.

Beschreibung

public bool AMQPConnection::reconnect ( void )

This method will close any open connections and initiate a new connection with the AMQP broker.

Parameter-Liste

Diese Funktion hat keine Parameter.

Rückgabewerte

Gibt bei Erfolg TRUE zurück. Im Fehlerfall wird FALSE zurückgegeben.

Beispiele

Beispiel #1 AMQPConnection::reconnect() example

<?php

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

// set the login details
$cnn->setLogin('mylogin');
$cnn->setPassword('mypass');

$cnn->connect();

// do something interesting


// ensure we have a valid connection
if (!$cnn->reconnect()) {
    echo 
"Could not reconnect to server";
}

?>



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

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