mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 12:59:46 +00:00
Make use of the MTProtoLayer in MTProtoSender
This commit is contained in:
18
telethon/network/requeststate.py
Normal file
18
telethon/network/requeststate.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import asyncio
|
||||
|
||||
|
||||
class RequestState:
|
||||
"""
|
||||
This request state holds several information relevant to sent messages,
|
||||
in particular the message ID assigned to the request, the container ID
|
||||
it belongs to, the request itself, the request as bytes, and the future
|
||||
result that will eventually be resolved.
|
||||
"""
|
||||
__slots__ = ('container_id', 'msg_id', 'request', 'data', 'future')
|
||||
|
||||
def __init__(self, request, loop):
|
||||
self.container_id = None
|
||||
self.msg_id = None
|
||||
self.request = request
|
||||
self.data = bytes(request)
|
||||
self.future = asyncio.Future(loop=loop)
|
Reference in New Issue
Block a user