tdesktop/Telegram/SourceFiles/mtproto
Loïc Molinari 06618a5253 Use fine grained session timers
The check of sent requests and containers is done unconditionally
every second even though the request timeout is 10 seconds and the
container timeout is 600 seconds. This commit uses fine grained timers
instead in order to avoid useless system wake-up events.

The check of sent requests is now scheduled on demand when a new
request is queued. Then the callback, while parsing queued requests,
computes the delta to the closest expiring request and automatically
schedules the next check if necessary.

Given the high value of the container timeout, its callback is called
repeatedly every 600 seconds, unless it computes a lower delta for an
expiring container using the same logic as for the requests.
2021-04-15 16:20:42 +03:00
..
details Fix build on macOS and Linux. 2021-04-12 10:48:17 +04:00
config_loader.cpp Allow getting outer_msg_id in MTProto handlers. 2021-03-12 16:58:26 +04:00
config_loader.h Rename RPCError to MTP::Error. 2021-03-12 16:58:26 +04:00
connection_abstract.cpp
connection_abstract.h Build with QT_NO_KEYWORDS 2021-03-04 12:07:54 +04:00
connection_http.cpp Build with QT_NO_KEYWORDS 2021-03-04 12:07:54 +04:00
connection_http.h
connection_resolving.cpp Avoid multiple .arg usage as suggested by clazy 2021-03-13 19:08:33 +03:00
connection_resolving.h
connection_tcp.cpp Build with QT_NO_KEYWORDS 2021-03-04 12:07:54 +04:00
connection_tcp.h
core_types.h Support broadcast mode in voice chats. 2021-03-12 16:58:26 +04:00
dedicated_file_loader.cpp Rename RPCError to MTP::Error. 2021-03-12 16:58:26 +04:00
dedicated_file_loader.h Rename RPCError to MTP::Error. 2021-03-12 16:58:26 +04:00
facade.cpp
facade.h Support broadcast mode in voice chats. 2021-03-12 16:58:26 +04:00
mtp_instance.cpp Watch for network availability changes 2021-04-06 16:40:29 +03:00
mtp_instance.h Rename RPCError to MTP::Error. 2021-03-12 16:58:26 +04:00
mtproto_auth_key.cpp
mtproto_auth_key.h
mtproto_concurrent_sender.cpp Rename RPCError to MTP::Error. 2021-03-12 16:58:26 +04:00
mtproto_concurrent_sender.h Rename RPCError to MTP::Error. 2021-03-12 16:58:26 +04:00
mtproto_config.cpp
mtproto_config.h
mtproto_dc_options.cpp Get rid of deprecated ranges::view usage 2021-03-13 19:14:58 +03:00
mtproto_dc_options.h
mtproto_dh_utils.cpp
mtproto_dh_utils.h
mtproto_pch.h
mtproto_proxy_data.cpp
mtproto_proxy_data.h
mtproto_response.cpp Rename RPCError to MTP::Error. 2021-03-12 16:58:26 +04:00
mtproto_response.h Allow saving and using saved credentials. 2021-04-06 18:41:16 +04:00
sender.h Rename RPCError to MTP::Error. 2021-03-12 16:58:26 +04:00
session_private.cpp Use fine grained session timers 2021-04-15 16:20:42 +03:00
session_private.h Use fine grained session timers 2021-04-15 16:20:42 +03:00
session.cpp Remove dangling timer in MTP Session 2021-04-12 12:03:15 +03:00
session.h Remove dangling timer in MTP Session 2021-04-12 12:03:15 +03:00
special_config_request.cpp Avoid multiple .arg usage as suggested by clazy 2021-03-13 19:08:33 +03:00
special_config_request.h
type_utils.h