Sulu\Bundle\PreviewBundle\Websocket\PreviewMessageHandler::handle PHP Method

handle() public method

public handle ( Ratchet\ConnectionInterface $conn, array $message, MessageHandlerContext $context )
$conn Ratchet\ConnectionInterface
$message array
$context Sulu\Component\Websocket\MessageDispatcher\MessageHandlerContext
    public function handle(ConnectionInterface $conn, array $message, MessageHandlerContext $context)
    {
        // reconnect mysql
        $this->reconnect();
        try {
            return $this->execute($context, $message);
        } catch (PreviewException $ex) {
            throw new MessageHandlerException($ex);
        }
    }