def __init__(self, port):
        "Binds the server to the given port."

        self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
        self.socket.bind(port)

        #Queue up to five requests before turning clients away.
        self.socket.listen(5)
Binds the server to the given port.
recipes/Python/576574_Login_Logger/recipe-576574.py