This commit is contained in:
2020-11-01 04:27:55 +08:00
parent 4dffbe33be
commit 000f0c655e
+2 -2
View File
@@ -357,8 +357,8 @@ class Server extends Application
$this->onBind($newListener, 'close', [Snowflake::createObject(OnClose::class), 'onHandler']);
$callback = Snowflake::createObject([
'class' => $config['type'] == self::TCP ? OnReceive::class : OnPacket::class,
'pack' => $config['resolve'] ?? $config['resolve']['pack'] ?? null,
'unpack' => $config['resolve'] ?? $config['resolve']['unpack'] ?? null
'pack' => $config['resolve']['pack'] ?? null,
'unpack' => $config['resolve']['unpack'] ?? null
]);
$this->onBind($newListener, 'packet', [$callback, 'onHandler']);
$this->onBind($newListener, 'receive', [$callback, 'onHandler']);