Avoid counterintuitive automatic connection

This commit is contained in:
Lonami Exo
2017-05-20 11:33:37 +02:00
parent bbd3eb7c28
commit 468033fa7e
4 changed files with 10 additions and 2 deletions

View File

@@ -12,8 +12,13 @@ class MtProtoPlainSender:
self._time_offset = 0
self._last_msg_id = 0
self._transport = transport
def connect(self):
self._transport.connect()
def disconnect(self):
self._transport.close()
def send(self, data):
"""Sends a plain packet (auth_key_id = 0) containing the given message body (data)"""
with BinaryWriter() as writer: