Skip to content

Instantly share code, notes, and snippets.

@prologic
Created June 15, 2015 06:35
Show Gist options
  • Save prologic/874416e6f0a64d358d98 to your computer and use it in GitHub Desktop.
Save prologic/874416e6f0a64d358d98 to your computer and use it in GitHub Desktop.
created by github.com/tr3buchet/gister
#!/usr/bin/env python
import socket
ip, port = "0.0.0.0", 10000
SocketFd = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
SocketFd.bind((ip, port))
SocketFd.listen(5)
NewSFD = []
while True:
NewSFD.append(SocketFd.accept())
if len(NewSFD) == 5:
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment