'Register a stream feature handler.
:param name: The name of the stream feature.
:param handler: The function to execute if the feature is received.
:param restart: Indicates if feature processing should halt with
this feature. Defaults to ``False``.
:param order: The relative ordering in which the feature should
be negotiated. Lower values will be attempted
earlier when available.'

def register_feature(self, name, handler, restart=False, order=5000):

    self._stream_feature_handlers[name] = (handler, restart)
    self._stream_feature_order.append((order, name))
    self._stream_feature_order.sort()
