mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-09 05:19:41 +00:00
Remove ability to TcpClient.cancel_read()
This simplifies the process of sending and receiving data, and makes use of Python's socket.settimeout instead a hand-crafted version with a sort-of arbitrary self.delay = 0.1 (seconds), which should improve the speed of the method
This commit is contained in:
@@ -96,11 +96,6 @@ class Connection:
|
||||
def close(self):
|
||||
self.conn.close()
|
||||
|
||||
def cancel_receive(self):
|
||||
"""Cancels (stops) trying to receive from the
|
||||
remote peer and raises a ReadCancelledError"""
|
||||
self.conn.cancel_read()
|
||||
|
||||
def get_client_delay(self):
|
||||
"""Gets the client read delay"""
|
||||
return self.conn.delay
|
||||
|
Reference in New Issue
Block a user