Connects to the specified given connection using the given auth key.
Cleanly disconnects the instance from the network, cancels all pending requests, and closes the send and receive loops.
This method enqueues the given request to be sent. Its send
state will be saved until a response arrives, and a Future
that will be resolved when the response arrives will be returned:
.. code-block:: javascript
async def method():
future = sender.send(request)
result = await future
Designed like this because Telegram may send the response at
any point, and it can send other items while one waits for it.
Once the response for this future arrives, it is set with the
received result, quite similar to how a receive()
call
would otherwise work.
Since the receiving part is "built in" the future, it's impossible to await receive a result that was never sent.
Handles a server acknowledge about our messages. Normally these can be ignored
Generated using TypeDoc