如何关闭并关闭此特定连接?
import socket
import socks
from urllib.request import urlopen
socks.set_default_proxy(socks.SOCKS5, "localhost", 9150)
socket.socket = socks.socksocket
urlopen("http://www.sourceforge.net/")
我已经尝试过socket.socket.shutdown(socket.SHUT_RDWR)
,但这根本不起作用:
TypeError: descriptor 'shutdown' requires a '_socket.socket' object but received a 'int'