Skip to content
This repository was archived by the owner on May 5, 2020. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions twisted/plugins/sockjs_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,14 @@
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
# OF THE POSSIBILITY OF SUCH DAMAGE.

from zope.interface import implements
from zope.interface import implementer
from twisted.plugin import IPlugin
from twisted.internet.interfaces import IStreamServerEndpointStringParser, IStreamServerEndpoint
from twisted.internet.endpoints import serverFromString
from txsockjs.factory import SockJSFactory

@implementer(IPlugin, IStreamServerEndpointStringParser)
class SockJSServerParser(object):
implements(IPlugin, IStreamServerEndpointStringParser)

prefix = "sockjs"

def parseStreamServer(self, reactor, description, **options):
Expand All @@ -53,9 +52,8 @@ def parseStreamServer(self, reactor, description, **options):
endpoint = serverFromString(reactor, description)
return SockJSServerEndpoint(endpoint, options)

@implementer(IPlugin, IStreamServerEndpoint)
class SockJSServerEndpoint(object):
implements(IPlugin, IStreamServerEndpoint)

def __init__(self, endpoint, options):
self._endpoint = endpoint
self._options = options
Expand Down