'Create a new instance of the LibevConnection class, connecting
to RabbitMQ automatically
:param pika.connection.Parameters parameters: Connection parameters
:param on_open_callback: The method to call when the connection is open
:type on_open_callback: method
:param method on_open_error_callback: Called if the connection can\'t
be established: on_open_error_callback(connection, str|exception)
:param method on_close_callback: Called when the connection is closed:
on_close_callback(connection, reason_code, reason_text)
:param bool stop_ioloop_on_close: Call ioloop.stop() if disconnected
:param custom_ioloop: Override using the default IOLoop in libev
:param on_signal_callback: Method to call if SIGINT or SIGTERM occur
:type on_signal_callback: method'

def __init__(self, parameters=None, on_open_callback=None, on_open_error_callback=None, on_close_callback=None, stop_ioloop_on_close=False, custom_ioloop=None, on_signal_callback=None):

    if custom_ioloop:
        self.ioloop = custom_ioloop
    else:
        with warnings.catch_warnings():
            warnings.simplefilter('ignore', RuntimeWarning)
            self.ioloop = pyev.default_loop()
            self.ioloop.update()
    self.async = None
    self._on_signal_callback = on_signal_callback
    self._io_watcher = None
    self._active_timers = {}
    self._stopped_timers = deque()
    super(LibevConnection, self).__init__(parameters, on_open_callback, on_open_error_callback, on_close_callback, self.ioloop, stop_ioloop_on_close)
