Changeset 41:72fa7b817767 for wokkel/component.py
- Timestamp:
- Oct 18, 2008, 12:40:56 PM (14 years ago)
- Branch:
- default
- Convert:
- svn:b33ecbfc-034c-dc11-8662-000475d9059e/trunk@113
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
wokkel/component.py
r40 r41 15 15 from twisted.words.xish import domish 16 16 17 try: 18 #from twisted.words.protocols.jabber.xmlstream import XMPPHandler 19 from twisted.words.protocols.jabber.xmlstream import XMPPHandlerCollection 20 except ImportError: 21 #from wokkel.subprotocols import XMPPHandler 22 from wokkel.subprotocols import XMPPHandlerCollection 23 24 try: 25 from twisted.words.protocols.jabber.xmlstream import XmlStreamServerFactory 26 except ImportError: 27 from wokkel.compat import XmlStreamServerFactory 28 17 29 from wokkel.generic import XmlPipe 18 30 from wokkel.subprotocols import StreamManager … … 67 79 68 80 69 class InternalComponent( xmlstream.XMPPHandlerCollection, service.Service):81 class InternalComponent(XMPPHandlerCollection, service.Service): 70 82 """ 71 83 Component service that connects directly to a router. … … 77 89 78 90 def __init__(self, router, domain): 79 xmlstream.XMPPHandlerCollection.__init__(self)91 XMPPHandlerCollection.__init__(self) 80 92 self.router = router 81 93 self.domain = domain … … 116 128 Add a new handler and connect it to the stream. 117 129 """ 118 xmlstream.XMPPHandlerCollection.addHandler(self, handler)130 XMPPHandlerCollection.addHandler(self, handler) 119 131 120 132 if self.xmlstream: … … 169 181 xmlstream.ListenAuthenticator.streamStarted(self, rootElement) 170 182 171 # Compatibility fix 183 # Compatibility fix for pre-8.2 implementations of ListenAuthenticator 172 184 if not self.xmlstream.sid: 173 185 from twisted.python import randbytes … … 300 312 301 313 302 class XMPPComponentServerFactory( xmlstream.XmlStreamServerFactory):314 class XMPPComponentServerFactory(XmlStreamServerFactory): 303 315 """ 304 316 XMPP Component Server factory. … … 318 330 return ListenComponentAuthenticator(self.secret) 319 331 320 xmlstream.XmlStreamServerFactory.__init__(self, authenticatorFactory)332 XmlStreamServerFactory.__init__(self, authenticatorFactory) 321 333 self.addBootstrap(xmlstream.STREAM_CONNECTED_EVENT, 322 334 self.makeConnection)
Note: See TracChangeset
for help on using the changeset viewer.