Skip to content

Instantly share code, notes, and snippets.

@pr0b3r7
pr0b3r7 / echo.py
Created February 10, 2019 15:23 — forked from solusipse/echo.py
Simple echo server written in pure Python
# Example of simple echo server
# www.solusipse.net
import socket
def listen():
connection = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
connection.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
connection.bind(('0.0.0.0', 5555))
connection.listen(10)