File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ class Constant
15
15
{
16
16
public const PROTOCOL_DEFAULT = 'multiplex.default ' ;
17
17
18
+ public const PROTOCOL_PHP_SERIALIZE = 'multiplex.php_serialize ' ;
19
+
18
20
public const REQUEST_ID = 'request_id ' ;
19
21
20
22
public const ID = 'id ' ;
Original file line number Diff line number Diff line change 11
11
*/
12
12
namespace Hyperf \RpcMultiplex \Listener ;
13
13
14
+ use Hyperf \Codec \Packer \PhpSerializerPacker ;
14
15
use Hyperf \Event \Contract \ListenerInterface ;
15
16
use Hyperf \Framework \Event \BootApplication ;
16
17
use Hyperf \Rpc \ProtocolManager ;
@@ -45,5 +46,12 @@ public function process(object $event): void
45
46
'path-generator ' => PathGenerator::class,
46
47
'data-formatter ' => DataFormatter::class,
47
48
]);
49
+
50
+ $ this ->protocolManager ->register (Constant::PROTOCOL_PHP_SERIALIZE , [
51
+ 'packer ' => PhpSerializerPacker::class,
52
+ 'transporter ' => Transporter::class,
53
+ 'path-generator ' => PathGenerator::class,
54
+ 'data-formatter ' => DataFormatter::class,
55
+ ]);
48
56
}
49
57
}
You can’t perform that action at this time.
0 commit comments