class_docstr: Parser for the Telnet protocol.
  Usage::
  
      def data_received(data):
          print(data)
  
      def size_received(rows, columns):
          print(rows, columns)
  
      p = TelnetProtocolParser(data_received, size_received)
      p.feed(binary_data)
class_docstr_tok: ["Parser","for","the","Telnet","protocol",".","Usage",":",":","def","data_received","(","data",")",":","print","(","data",")","def","size_received","(","rows",",","columns",")",":","print","(","rows",",","columns",")","p","=","TelnetProtocolParser","(","data_received",",","size_received",")","p.feed","(","binary_data",")"]
docstr: Received terminal type.
docstr_tok: ["Received","terminal","type","."]
code: def ttype(self, data: bytes) -> None:
      """
      Received terminal type.
      """
      subcmd, data = data[0:1], data[1:]
      if subcmd == IS:
          ttype = data.decode("ascii")
          self.ttype_received_callback(ttype)
      else:
          logger.warning(
              "Received a non-IS terminal type Subnegotiation"
          )
  
file_path: catboost/contrib/python/prompt-toolkit/py3/prompt_toolkit/contrib/telnet/protocol.py
imports: from __future__ import annotations
  import struct
  from typing import Callable, Generator
  from .log import logger
label_desc: Use image node_id 9 for calling the TelnetProtocolParser obj's underlying member method code with example usage: obj.ttype(data) without return types