Skip to content

Instantly share code, notes, and snippets.

View pykello's full-sized avatar

Hadi Moshayedi pykello

View GitHub Profile
@pykello
pykello / echo.py
Created April 28, 2019 07:11 — forked from solusipse/echo.py
Simple echo server written in pure Python
# Example of simple echo server
# www.solusipse.net
import socket
def listen():
socket1 = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket1.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
socket1.bind(('0.0.0.0', 5555))
socket1.listen(10)