Remove old commented (non-async) code from tcp.py

This commit is contained in:
Dan 2018-09-07 00:44:31 +02:00
parent 45a32ddd88
commit b588b55358

View File

@ -101,47 +101,3 @@ class TCP:
return None
return data
# class TCP(socks.socksocket):
# def __init__(self, proxy: dict):
# super().__init__()
# self.settimeout(10)
# self.proxy_enabled = proxy.get("enabled", False)
#
# if proxy and self.proxy_enabled:
# self.set_proxy(
# proxy_type=socks.SOCKS5,
# addr=proxy.get("hostname", None),
# port=proxy.get("port", None),
# username=proxy.get("username", None),
# password=proxy.get("password", None)
# )
#
# log.info("Using proxy {}:{}".format(
# proxy.get("hostname", None),
# proxy.get("port", None)
# ))
#
# def close(self):
# try:
# self.shutdown(socket.SHUT_RDWR)
# except OSError:
# pass
# finally:
# super().close()
#
# def recvall(self, length: int) -> bytes or None:
# data = b""
#
# while len(data) < length:
# try:
# packet = super().recv(length - len(data))
# except OSError:
# return None
# else:
# if packet:
# data += packet
# else:
# return None
#
# return data