Browse Source

minor documentation fixes

pull/56/head
Miguel Grinberg 9 years ago
parent
commit
5cc9199336
  1. 3
      docs/index.rst
  2. 6
      socketio/server.py

3
docs/index.rst

@ -244,6 +244,9 @@ instance includes versions of several of the methods in the
:class:`socketio.Server` class that default to the proper namespace when the :class:`socketio.Server` class that default to the proper namespace when the
``namespace`` argument is not given. ``namespace`` argument is not given.
Note: if an event has a handler in a class-based namespace, and also a
decorator-based function handler, the standalone function handler is invoked.
Using a Message Queue Using a Message Queue
--------------------- ---------------------

6
socketio/server.py

@ -155,9 +155,9 @@ class Server(object):
def register_namespace(self, namespace_handler): def register_namespace(self, namespace_handler):
"""Register a namespace handler object. """Register a namespace handler object.
:param namespace_handler: A namespace subclass that handles all the :param namespace_handler: An instance of a :class:`Namespace`
event traffic for a namespace. This method subclass that handles all the event traffic
accepts the class itself, or an instance. for a namespace.
""" """
if not isinstance(namespace_handler, namespace.Namespace): if not isinstance(namespace_handler, namespace.Namespace):
raise ValueError('Not a namespace instance') raise ValueError('Not a namespace instance')

Loading…
Cancel
Save