Created
June 15, 2015 06:35
-
-
Save prologic/874416e6f0a64d358d98 to your computer and use it in GitHub Desktop.
created by github.com/tr3buchet/gister
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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