示例#1
0
 /**
  * @param Replay $replay
  * @param BinaryReader $br
  * @param int $number
  * @return Frame
  */
 public static function deserialize($replay, $br, $number)
 {
     $frame = new self($number);
     $frame->time = $br->readFloat();
     $frame->diff = $br->readFloat();
     while ($br->readBit() == 1) {
         $frame->replications[] = Replication::deserialize($replay, $br, $frame->number);
     }
     print "end\n";
     print $br->readBits(200);
     print "\n";
     return $frame;
 }
<?php

/**
* Same as index.php, but default to TestAndHeal action
*
*/
require 'replication-monitor.class.php';
$replication = new Replication();
$replication->startup(array('master' => array('host' => '10.0.0.1', 'user' => 'root', 'pass' => 'MySuperSecretPassword', 'testDB' => 'util_replication'), 'slave' => array('host' => '10.0.0.2', 'user' => 'root', 'pass' => 'MySuperSecretPassword', 'testDB' => 'util_replication')));
echo $replication->html('TestAndHeal');