diff --git a/socketio/server.py b/socketio/server.py index e927a7f..90c407c 100644 --- a/socketio/server.py +++ b/socketio/server.py @@ -158,11 +158,14 @@ class Server(object): :param namespace_class: The sub class of ``Namespace`` to register handlers of. Don't pass an instance instead. + This function returns the instance of ``namespace_class`` created. + See documentation of ``Namespace`` class for an example. """ namespace = namespace_class(name, self) for event, handler in six.iteritems(namespace._get_handlers()): self.on(event, handler=handler, namespace=name) + return namespace def emit(self, event, data=None, room=None, skip_sid=None, namespace=None, callback=None):