From d09627faff80e78b92a27ec8f8c46a846002e873 Mon Sep 17 00:00:00 2001 From: Miguel Grinberg Date: Fri, 25 Nov 2016 16:42:19 -0800 Subject: [PATCH] Added clarification regarding class based namespace being singletons Fixes #59 --- docs/index.rst | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 56a6aa6..d71439a 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -244,8 +244,14 @@ instance includes versions of several of the methods in the :class:`socketio.Server` class that default to the proper namespace when the ``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. +In the case that an event has a handler in a class-based namespace, and also a +decorator-based function handler, only the standalone function handler is +invoked. + +It is important to note that class-based namespaces are singletons. This means +that a single instance of a namespace class is used for all clients, and +consequently, a namespace instance cannot be used to store client specific +information. Using a Message Queue ---------------------