/** * 获取协议名字 * @param CatLib\Constraint\Network\IPacket $packet 协议包 */ protected function getProtoClassName(IPacket $packet) { $protoID = $packet->protoID(); $protoName = $this->getProtoName($protoID); if ($protoName == null) { return null; } $protoName = $this->getPackage() . str_replace($this->protoPrefix, "", $protoName); return "\\" . $protoName; }