File: router.tac

package info (click to toggle)
python-tx-xmpp 0.10.1.post1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,468 kB
  • sloc: python: 12,915; makefile: 3
file content (19 lines) | stat: -rw-r--r-- 576 bytes parent folder | download
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)