public function writePacket(Struct &$packet) { if ($this->socketType == SOCKTYPE_UDP) { return $this->writeUDP($packet->pack()); } else { return $this->writeTCP($packet->pack()); } }
public function pack() { if (strLen($this->Text) > 239) { $this->Text = subStr($this->Text, 0, 239); } return parent::pack(); }