Skip to content

Instantly share code, notes, and snippets.

@zslayton
Created November 10, 2014 22:00
Show Gist options
  • Save zslayton/7ce751194d493d1fe9b9 to your computer and use it in GitHub Desktop.
Save zslayton/7ce751194d493d1fe9b9 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
import socket, time
connections = []
for i in range(10000):
s = socket.socket()
s.connect(("localhost", 44444))
connections.append(s)
if len(connections) % 100 == 0:
print "Connections: " + str(len(connections))
print "Sleeping"
time.sleep(500)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment