diff options
author | shmel1k <shmel1k@ydb.tech> | 2023-11-26 18:16:14 +0300 |
---|---|---|
committer | shmel1k <shmel1k@ydb.tech> | 2023-11-26 18:43:30 +0300 |
commit | b8cf9e88f4c5c64d9406af533d8948deb050d695 (patch) | |
tree | 218eb61fb3c3b96ec08b4d8cdfef383104a87d63 /contrib/python/Twisted/py3/twisted/words/xmpproutertap.py | |
parent | 523f645a83a0ec97a0332dbc3863bb354c92a328 (diff) | |
download | ydb-b8cf9e88f4c5c64d9406af533d8948deb050d695.tar.gz |
add kikimr_configure
Diffstat (limited to 'contrib/python/Twisted/py3/twisted/words/xmpproutertap.py')
-rw-r--r-- | contrib/python/Twisted/py3/twisted/words/xmpproutertap.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/contrib/python/Twisted/py3/twisted/words/xmpproutertap.py b/contrib/python/Twisted/py3/twisted/words/xmpproutertap.py new file mode 100644 index 0000000000..2a95f844fb --- /dev/null +++ b/contrib/python/Twisted/py3/twisted/words/xmpproutertap.py @@ -0,0 +1,29 @@ +# -*- test-case-name: twisted.words.test.test_xmpproutertap -*- +# +# Copyright (c) Twisted Matrix Laboratories. +# See LICENSE for details. + +from twisted.application import strports +from twisted.python import usage +from twisted.words.protocols.jabber import component + + +class Options(usage.Options): + optParameters = [ + ("port", None, "tcp:5347:interface=127.0.0.1", "Port components connect to"), + ("secret", None, "secret", "Router secret"), + ] + + optFlags = [ + ("verbose", "v", "Log traffic"), + ] + + +def makeService(config): + router = component.Router() + factory = component.XMPPComponentServerFactory(router, config["secret"]) + + if config["verbose"]: + factory.logTraffic = True + + return strports.service(config["port"], factory) |