This commit is contained in:
freek 2018-11-22 00:15:39 +01:00
parent bccc53896a
commit 7393006666
1 changed files with 4 additions and 10 deletions

View File

@ -36,26 +36,20 @@ class PusherMessage implements RespondableMessage
} }
} }
/** /*
* @link https://pusher.com/docs/pusher_protocol#ping-pong * @link https://pusher.com/docs/pusher_protocol#ping-pong
*
* @param ConnectionInterface $connection
* @param $payload
*/ */
protected function ping(ConnectionInterface $connection, $payload) protected function ping(ConnectionInterface $connection)
{ {
$connection->send(json_encode([ $connection->send(json_encode([
'event' => 'pusher:pong', 'event' => 'pusher:pong',
])); ]));
} }
/** /*
* @link https://pusher.com/docs/pusher_protocol#pusher-subscribe * @link https://pusher.com/docs/pusher_protocol#pusher-subscribe
*
* @param ConnectionInterface $conn
* @param $payload
*/ */
protected function subscribe(ConnectionInterface $connection, $payload) protected function subscribe(ConnectionInterface $connection, stdClass $payload)
{ {
$channel = $this->channelManager->findOrCreate($connection->appId, $payload->channel); $channel = $this->channelManager->findOrCreate($connection->appId, $payload->channel);