Mercurial > libervia-backend
comparison sat/core/constants.py @ 2691:1ecceac3df96
plugin XEP-0198: Stream Management implementation:
- hooks can now be set in stream onElement and send methods
- xmllog refactored to use new hooks
- client.isConnected now uses transport.connected method
- fixed reconnection, SàT will now try to reconnect indefinitely until it success, unresolvable failure happen (e.g. invalid certificate), or explicit disconnection is requested (or a plugin change this behaviour)
- new triggers: "stream_hooks", "disconnecting", "disconnected", and "xml_init" (replace "XML Initialized")
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 18 Nov 2018 15:49:46 +0100 |
parents | a7529543bbb1 |
children | a8ec00731ce7 |
comparison
equal
deleted
inserted
replaced
2690:56bfe1b79204 | 2691:1ecceac3df96 |
---|---|
48 DEFAULT_BRIDGE = "dbus" | 48 DEFAULT_BRIDGE = "dbus" |
49 | 49 |
50 ## Protocol ## | 50 ## Protocol ## |
51 XMPP_C2S_PORT = 5222 | 51 XMPP_C2S_PORT = 5222 |
52 XMPP_KEEP_ALIFE = 180 | 52 XMPP_KEEP_ALIFE = 180 |
53 XMPP_MAX_RETRIES = 2 | 53 XMPP_MAX_RETRIES = None |
54 # default port used on Prosody, may differ on other servers | 54 # default port used on Prosody, may differ on other servers |
55 XMPP_COMPONENT_PORT = 5347 | 55 XMPP_COMPONENT_PORT = 5347 |
56 | 56 |
57 ## Parameters ## | 57 ## Parameters ## |
58 NO_SECURITY_LIMIT = -1 # FIXME: to rename | 58 NO_SECURITY_LIMIT = -1 # FIXME: to rename |
401 ENV_PREFIX = "SAT_" # Prefix used for environment variables | 401 ENV_PREFIX = "SAT_" # Prefix used for environment variables |
402 IGNORE = "ignore" | 402 IGNORE = "ignore" |
403 NO_LIMIT = -1 # used in bridge when a integer value is expected | 403 NO_LIMIT = -1 # used in bridge when a integer value is expected |
404 DEFAULT_MAX_AGE = 1209600 # default max age of cached files, in seconds | 404 DEFAULT_MAX_AGE = 1209600 # default max age of cached files, in seconds |
405 HASH_SHA1_EMPTY = "da39a3ee5e6b4b0d3255bfef95601890afd80709" | 405 HASH_SHA1_EMPTY = "da39a3ee5e6b4b0d3255bfef95601890afd80709" |
406 STANZA_NAMES = (u"iq", u"message", u"presence") | |
407 | |
408 # Stream Hooks | |
409 STREAM_HOOK_SEND = u"send" | |
410 STREAM_HOOK_RECEIVE = u"receive" | |
406 | 411 |
407 @classmethod | 412 @classmethod |
408 def LOG_OPTIONS(cls): | 413 def LOG_OPTIONS(cls): |
409 """Return options checked for logs""" | 414 """Return options checked for logs""" |
410 # XXX: we use a classmethod so we can use Const inheritance to change default options | 415 # XXX: we use a classmethod so we can use Const inheritance to change default options |