def __init__(self, port=23, address='', on_connect=None,
                 on_disconnect=None, max_connections=MAX_CONNECTIONS,
                 timeout=0.1, server_socket=None, create_client=True):
        """ Create a new Telnet server.

        :param int port: The port to listen for new connection on; on
                         UNIX-like platforms you made need root access to
                         use ports under 1025
        :param str address: The address of the LOCAL network interface to
                            bind the listening port to; you can usually leave
                            this blank unless you want to restrict traffic
                            to a specific network device
        :param callable on_connect: Callback for new telnet connections
        :param callable on_disconnect: Callback for lost telnet connections
        :param int max_connections: Maximum simultaneous connections the
                                    server will allow
        :param float timeout: Amount of time that the server will wait for
                              client input while polling
        :param socket server_socket: Optional, an existing server socket to use
        :param bool create_client: Whether to create new client instances or
                                   pass the incoming sockets directly to the
                                   on_connect callback

        """
        self.port = port
        self.address = address
        self.on_connect = on_connect
        self.on_disconnect = on_disconnect
        self.max_connections = min(max_connections, MAX_CONNECTIONS)
        self.timeout = timeout
        self.create_client = create_client
        self.server_socket = None
        self.server_fileno = None
        if server_socket is None:
            server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
            server_socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
            server_socket.bind((address, port))
            server_socket.listen(5)
        else:
            if server_socket == 0:
                server_socket = None
            else:
                server_socket = socket.fromfd(server_socket, socket.AF_INET,
                                              socket.SOCK_STREAM)
        if server_socket:
            self.server_socket = server_socket
            self.server_fileno = server_socket.fileno()
        # Dictionary of active clients,
        # key = file descriptor, value = TelnetClient instance
        self.clients = {}