Esempio n. 1
0
 /**
  * @param PhpAmqpLib_Wire_AMQPReader $args
  * @return array
  */
 public static function connectionStartOk($args)
 {
     $ret = array();
     $ret[] = $args->read_table();
     $ret[] = $args->read_shortstr();
     $ret[] = $args->read_longstr();
     $ret[] = $args->read_shortstr();
     return $ret;
 }
 /**
  * Starts connection negotiation
  *
  * @param PhpAmqpLib_Wire_AMQPReader $args
  */
 protected function connection_start($args)
 {
     $this->version_major = $args->read_octet();
     $this->version_minor = $args->read_octet();
     $this->server_properties = $args->read_table();
     $this->mechanisms = explode(' ', $args->read_longstr());
     $this->locales = explode(' ', $args->read_longstr());
     if ($this->debug) {
         PhpAmqpLib_Helper_MiscHelper::debug_msg(sprintf('Start from server, version: %d.%d, properties: %s, mechanisms: %s, locales: %s', $this->version_major, $this->version_minor, self::dump_table($this->server_properties), implode(', ', $this->mechanisms), implode(', ', $this->locales)));
     }
 }
Esempio n. 3
0
 /**
  * Only for AMQP0.8.0
  * This method allows the server to send a non-fatal warning to
  * the client.  This is used for methods that are normally
  * asynchronous and thus do not have confirmations, and for which
  * the server may detect errors that need to be reported.  Fatal
  * errors are handled as channel or connection exceptions; non-
  * fatal errors are sent through this method.
  *
  * @param PhpAmqpLib_Wire_AMQPReader $args
  */
 protected function channel_alert($args)
 {
     $reply_code = $args->read_short();
     $reply_text = $args->read_shortstr();
     $details = $args->read_table();
     array_push($this->alerts, array($reply_code, $reply_text, $details));
 }