A strange questions, about socket.py

C

Chaojie He

Code:
import urllib2 , socks , socket
socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5,'127.0.0.1',1080,True,None,None)
socket.socket = socks.socksocket
result = urllib2.urlopen("http://www.youtube.com",timeout=5)

If in the operation process of the server disconnected, the script will enter circulation state.

Log(The last part):
socks.py(140): while len(data) < bytes:
socks.py(141): data = data + self.recv(bytes-len(data))
socks.py(140): while len(data) < bytes:
socks.py(141): data = data + self.recv(bytes-len(data))
socks.py(140): while len(data) < bytes:
socks.py(141): data = data + self.recv(bytes-len(data))
socks.py(140): while len(data) < bytes:
socks.py(141): data = data + self.recv(bytes-len(data))
socks.py(140): while len(data) < bytes:
socks.py(141): data = data + self.recv(bytes-len(data))
socks.py(140): while len(data) < bytes:
socks.py(141): data = data + self.recv(bytes-len(data))
socks.py(140): while len(data) < bytes:
socks.py(141): data = data + self.recv(bytes-len(data))
socks.py(140): while len(data) < bytes:
socks.py(141): data = data + self.recv(bytes-len(data))
socks.py(140): while len(data) < bytes:
socks.py(141): data = data + self.recv(bytes-len(data))
socks.py(140): while len(data) < bytes:
socks.py(141): data = data + self.recv(bytes-len(data))
socks.py(140): while len(data) < bytes:
socks.py(141): data = data + self.recv(bytes-len(data))
socks.py(140): while len(data) < bytes:
socks.py(141): data = data + self.recv(bytes-len(data))
socks.py(140): while len(data) < bytes:
socks.py(141): data = data + self.recv(bytes-len(data))
socks.py(140): while len(data) < bytes:
socks.py(141): data = data + self.recv(bytes-len(data))
socks.py(140): while len(data) < bytes:
socks.py(141): data = data + self.recv(bytes-len(data))
socks.py(140): while len(data) < bytes:
socks.py(141): data = data + self.recv(bytes-len(data))
socks.py(140): while len(data) < bytes:
socks.py(141): data = data + self.recv(bytes-len(data))
socks.py(140): while len(data) < bytes:
socks.py(141): data = data + self.recv(bytes-len(data))
socks.py(140): while len(data) < bytes:
socks.py(141): data = data + self.recv(bytes-len(data))
socks.py(140): while len(data) < bytes:
socks.py(141): data = data + self.recv(bytes-len(data))
socks.py(140): while len(data) < bytes:
socks.py(141): data = data + self.recv(bytes-len(data))
socks.py(140): while len(data) < bytes:
socks.py(141): data = data + self.recv(bytes-len(data))
socks.py(140): while len(data) < bytes:
socks.py(141): data = data + self.recv(bytes-len(data))
socks.py(140): while len(data) < bytes:
socks.py(141): data = data + self.recv(bytes-len(data))
socks.py(140): while len(data) < bytes:
socks.py(141): data = data + self.recv(bytes-len(data))
socks.py(140): while len(data) < bytes:
socks.py(141): data = data + self.recv(bytes-len(data))
socks.py(140): while len(data) < bytes:
socks.py(141): data = data + self.recv(bytes-len(data))
socks.py(140): while len(data) < bytes:
socks.py(141): data = data + self.recv(bytes-len(data))
socks.py(140): while len(data) < bytes:
socks.py(141): data = data + self.recv(bytes-len(data))
socks.py(140): while len(data) < bytes:
socks.py(141): data = data + self.recv(bytes-len(data))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,709
Latest member
AustinMudi

Latest Threads

Top