def add_listener(self, on_connection_opened=None, on_connection_closed=None):
self._connection_listeners.append((on_connection_opened, on_connection_closed))<EOL>
Registers a ConnectionListener. If the same listener is registered multiple times, it will be notified multiple
times.

:param on_connection_opened: (Function), function to be called when a connection is opened.
:param on_connection_closed: (Function), function to be called when a connection is removed.