Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2015
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. >>> import socket
  2. >>> sk = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  3. >>> sk.bind(("0.0.0.0", 43892))
  4. Traceback (most recent call last):
  5.   File "<stdin>", line 1, in <module>
  6. OSError: [Errno 98] Address already in use
  7. >>> sk.bind(("0.0.0.0", 43893))
  8. >>> sk.listen(128)
  9. >>> client, address = sk.accept()
  10. >>> client.send(b"foo")
  11. 3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement