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