protected function setErrorCallback(ConnectionInterface $connection, callable $callback)
    {
        $connection->setErrorCallback(function ($connection, $exception) use ($callback) {
            \call_user_func($callback, $this, $exception, $connection);
        });
    }
protected function setErrorCallback(ConnectionInterface $connection, callable $callback)
    {
        $connection->setErrorCallback(function ($connection, $exception) use ($callback) {
            \call_user_func($callback, $this, $exception, $connection);
        });
    }
protected function setErrorCallback ( ConnectionInterface $ connection , callable $ callback ) { $ connection -> setErrorCallback ( function ( $ connection , $ exception ) use ( $ callback ) { \ call_user_func ( $ callback , $ this , $ exception , $ connection ) ; } ) ; }
Sets the callback used to notify the client about connection errors.

@param ConnectionInterface $connection Connection instance.
@param callable            $callback   Callback for error event.
Sets the callback used to notify the client about connection errors .