Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import socket
s1 = socket.socket()
s2 = socket.socket()
s1.bind(('0.0.0.0', 1234))
s2.bind(('0.0.0.0', 1234))
# Traceback (most recent call last):
# File "socket_in_use.py", line 4, in <module>
# s1.bind(('0.0.0.0', 1234))
# OSError: [Errno 48] Address already in use
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment