Open
Description
swoole
Swoole => enabled
Author => Swoole Team <[email protected]>
Version => 5.0.2
Built => Aug 8 2023 05:57:05
coroutine => enabled with boost asm context
epoll => enabled
eventfd => enabled
signalfd => enabled
spinlock => enabled
rwlock => enabled
openssl => OpenSSL 1.1.1v 1 Aug 2023
dtls => enabled
http2 => enabled
json => enabled
zlib => 1.2.12
brotli => E16777225/D16777225
mutex_timedlock => enabled
pthread_barrier => enabled
futex => enabled
async_redis => enabled
Directive => Local Value => Master Value
swoole.enable_coroutine => On => On
swoole.enable_library => On => On
swoole.enable_preemptive_scheduler => Off => Off
swoole.display_errors => On => On
swoole.use_shortname => Off => Off
swoole.unixsock_buffer_size => 8388608 => 8388608
PHP 8.1.12 (cli) (built: Oct 28 2022 19:11:07) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.12, Copyright (c) Zend Technologies
Exception: Couldn't find descriptor. Note only generated code may derive from \Google\Protobuf\Internal\Message in /www/conversation/grpc/Protobuf/C2SAudio.php:30
<?php
/**
* User: jesse
* Date: 2023/8/7 15:31
*/
namespace App\Service;
use Google\Protobuf\Internal\GPBUtil;
use Hyperf\Grpc\Parser;
use Grpc\C2SAudio;
class AudioService
{
public function handle($fd, $content)
{
/** @var C2SAudio $audio */
$audio = Parser::deserializeMessage([C2SAudio::class, null], $content);
var_dump($audio->getAudio());
return $content;
}
}
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: app/Proto/audio.proto
namespace Grpc;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>protobuf.C2SAudio</code>
*/
class C2SAudio extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>bytes audio = 1;</code>
*/
protected $audio = '';
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $audio
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Audio::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>bytes audio = 1;</code>
* @return string
*/
public function getAudio()
{
return $this->audio;
}
/**
* Generated from protobuf field <code>bytes audio = 1;</code>
* @param string $var
* @return $this
*/
public function setAudio($var)
{
GPBUtil::checkString($var, False);
$this->audio = $var;
return $this;
}
}
Metadata
Metadata
Assignees
Labels
No labels