Debian Codegraph @

doc/examples/router.tac

raw
1 """
2 A generic XMPP router.
3
4 This router accepts external server-side component connections on port 5347,
5 but only on 127.0.0.1.
6 """
7
8 from twisted.application import service, strports
9 from tx_xmpp import component
10
11 application = service.Application("XMPP router")
12
13 router = component.Router()
14
15 componentServerFactory = component.XMPPComponentServerFactory(router)
16 componentServerFactory.logTraffic = True
17 componentServer = strports.service('tcp:5347:interface=127.0.0.1',
18 componentServerFactory)
19 componentServer.setServiceParent(application)