class_docstr: Telnet server implementation.
code: def __init__(
      self,
      host="127.0.0.1",
      port=23,
      application=None,
      encoding="utf-8",
  ):
      assert isinstance(host, text_type)
      assert isinstance(port, int)
      assert isinstance(application, TelnetApplication)
      assert isinstance(encoding, text_type)
  
      self.host = host
      self.port = port
      self.application = application
      self.encoding = encoding
  
      self.connections = set()
  
      self._calls_from_executor = []
  
      # Create a pipe for inter thread communication.
      self._schedule_pipe = os.pipe()
      fcntl.fcntl(self._schedule_pipe[0], fcntl.F_SETFL, os.O_NONBLOCK)
  
imports: from __future__ import unicode_literals
  import socket
  import select
  import threading
  import os
  import fcntl
  from six import int2byte, text_type, binary_type
  from codecs import getincrementaldecoder
  from prompt_toolkit.enums import DEFAULT_BUFFER
  from prompt_toolkit.eventloop.base import EventLoop
  from prompt_toolkit.interface import CommandLineInterface, Application
  from prompt_toolkit.layout.screen import Size
  from prompt_toolkit.shortcuts import create_prompt_application
  from prompt_toolkit.terminal.vt100_input import InputStream
  from prompt_toolkit.terminal.vt100_output import Vt100_Output
  from .log import logger
  from .protocol import IAC, DO, LINEMODE, SB, MODE, SE, WILL, ECHO, NAWS, SUPPRESS_GO_AHEAD
  from .protocol import TelnetProtocolParser
  from .application import TelnetApplication
label_desc: Use image node_id 1 to create a new TelnetServer object from inherited base classes: object with example: obj = TelnetServer(host, port, application, encoding)