JustPaste.it
import threading
import socket
import socketserver
import time
from .xpr_conn import xpr_conn

print(__name__)

class xpr_server(threading.Thread):
    def __init__(self):
        threading.Thread.__init__(self)
        self.start()

    def run(self):
        sock = socket.socket()
        sock.bind(("", 9092))
        sock.listen(1000)
        while True:
            conn, addr = sock.accept()
            xpr_conn(conn)
            print("new connection ", addr)