Skip to content

Instantly share code, notes, and snippets.

@dohvis
Created April 18, 2015 17:11
Show Gist options
  • Save dohvis/7353b642c692cab62960 to your computer and use it in GitHub Desktop.
Save dohvis/7353b642c692cab62960 to your computer and use it in GitHub Desktop.
AF_INET = 2
SOCK_STREAM = 1
s = socket.socket(AF_INET, SOCK_STREAM)
s.bind(("0.0.0.0",8888))
s.listen(1)
while True:
print "wait for connection.."
s,addr = s.accept()
print addr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment