A strange questions, about socket.py

Discussion in 'Python' started by Chaojie He, Dec 27, 2012.

  1. Chaojie He

    Chaojie He Guest

    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))
    Chaojie He, Dec 27, 2012
    #1
    1. Advertising

  2. Chaojie He

    Chaojie He Guest

    I made a mistake,Sorry
    Chaojie He, Dec 27, 2012
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Laszlo Nagy
    Replies:
    1
    Views:
    4,811
    Mark Wooding
    Jan 27, 2009
  2. Jean-Paul Calderone
    Replies:
    0
    Views:
    962
    Jean-Paul Calderone
    Jan 27, 2009
  3. Laszlo Nagy
    Replies:
    0
    Views:
    542
    Laszlo Nagy
    Feb 1, 2009
  4. Steve Holden
    Replies:
    0
    Views:
    659
    Steve Holden
    Feb 1, 2009
  5. Steve Holden
    Replies:
    1
    Views:
    714
Loading...

Share This Page