Beispiel #1
0
 /**
  * @param int $type See Ganglia::TYPE_*
  * @return Packer
  */
 protected function getPacker($type)
 {
     $packer = new Packer();
     $packer->uint32($type);
     // Packet type (metadata or value)
     $packer->string($this->host);
     // Host name
     $packer->string($this->name);
     // Metric name
     $packer->uint32((int) $this->spoof);
     // Spoofing enabled?
     return $packer;
 }