Add a custom role for TL references and make use of it

This commit is contained in:
Lonami Exo
2018-03-23 21:40:24 +01:00
parent c6d821910e
commit 43c6896481
12 changed files with 212 additions and 134 deletions

View File

@@ -24,13 +24,15 @@ __log__ = logging.getLogger(__name__)
class MtProtoSender:
"""MTProto Mobile Protocol sender
(https://core.telegram.org/mtproto/description).
"""
MTProto Mobile Protocol sender
(https://core.telegram.org/mtproto/description).
Note that this class is not thread-safe, and calling send/receive
from two or more threads at the same time is undefined behaviour.
Rationale: a new connection should be spawned to send/receive requests
in parallel, so thread-safety (hence locking) isn't needed.
Note that this class is not thread-safe, and calling send/receive
from two or more threads at the same time is undefined behaviour.
Rationale:
a new connection should be spawned to send/receive requests
in parallel, so thread-safety (hence locking) isn't needed.
"""
def __init__(self, session, connection):