Several updates, fixes and additions (TcpClient, MtProto...)

README.md was updated to reflect more useful information
More errors from the official Telegrm website have been added
MtProtoSender now handles updates (and doesn't crash!)
Fixes on TcpClient to be able to receive whole large packets
Updated scheme.tl to the layer 55
Session is now saved more often (to prevent damages from crashes)
Fixes to the code generator (generated invalid code for reading "bytes")
This commit is contained in:
Lonami
2016-09-06 18:54:49 +02:00
parent 7802fe5487
commit 6b8a347426
12 changed files with 262 additions and 83 deletions

View File

@@ -20,7 +20,6 @@ class TcpTransport:
# Get a TcpMessage which contains the given packet
tcp_message = TcpMessage(self._send_counter, packet)
# TODO In TLSharp, this is async; Should both send and receive be here too?
self._tcp_client.write(tcp_message.encode())
self._send_counter += 1
@@ -48,6 +47,6 @@ class TcpTransport:
# If we passed the tests, we can then return a valid TcpMessage
return TcpMessage(seq, body)
def dispose(self):
def close(self):
if self._tcp_client.connected:
self._tcp_client.close()