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:
Lonami Exo
2017-09-02 19:14:11 +02:00
parent cc280a129d
commit 36f51e1e3f
2 changed files with 18 additions and 67 deletions

View File

@@ -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