code: def read_http(self, length):
          
          if length is None:
              length = len(self)
  
          if length < 9:
              raise ProtocolError(f'HTTP/2: invalid format', quiet=True)
  
          _tlen = self._read_unpack(3)
          _type = self._read_unpack(1)
          _flag = self._read_binary(1)
          _rsid = self._read_binary(4)
  
          if _tlen != length:
              raise ProtocolError(f'HTTP/2: [Type {_type}] invalid format', quiet=True)
  
          if int(_rsid[0], base=2):
              raise ProtocolError(f'HTTP/2: [Type {_type}] invalid format', quiet=True)
  
          http = dict(
              length=_tlen,
              type=_HTTP_TYPE.get(_type),
              sid=int(_rsid[1:], base=2),
              packet=self._read_packet(_tlen),
          )
  
          if http['type'] is None:
              raise ProtocolError(f'HTTP/2: [Type {_type}] invalid format', quiet=True)
  
          if http['type'] in ('SETTINGS', 'PING') and http['sid'] != 0:
              raise ProtocolError(f'HTTP/2: [Type {_type}] invalid format', quiet=True)
  
          _http = _HTTP_FUNC[_type](self, _tlen, _type, _flag)
          http.update(_http)
  
          return http
docs: Read Hypertext Transfer Protocol (HTTP/2).
  
          Structure of HTTP/2 packet [RFC 7540]:
              +-----------------------------------------------+
              |                 Length (24)                   |
              +---------------+---------------+---------------+
              |   Type (8)    |   Flags (8)   |
              +-+-------------+---------------+-------------------------------+
              |R|                 Stream Identifier (31)                      |
              +=+=============================================================+
              |                   Frame Payload (0...)                      ...
              +---------------------------------------------------------------+
  
              Octets      Bits        Name                    Description
                0           0     http.length             Length
                3          24     http.type               Type
                4          32     http.flags              Flags
                5          40     -                       Reserved
                5          41     http.sid                Stream Identifier
                9          72     http.payload            Frame Payload