Skip to content

Instantly share code, notes, and snippets.

@foone
Last active August 29, 2015 14:25
Show Gist options
  • Save foone/11b61ca92b206e278668 to your computer and use it in GitHub Desktop.
Save foone/11b61ca92b206e278668 to your computer and use it in GitHub Desktop.
import urllib2,sys,time
n=int(sys.argv[1])
connections=[urllib2.urlopen(sys.argv[2]) for _ in range(n)]
b=0
while True:
for c in connections:
c.read(1)
b+=1
print 'Bytes read:',b
time.sleep(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment