def get_frame_bin(self): if self._data is None: self._data = bytearray() self._data += int_to_bytes(self.last_stream_id, 4) self._data += int_to_bytes(self.error_code, 4) self._data = self.debug_data.encode(GoawayFrame.GOAWAY_DEBUG_ENCODING) return Frame.get_frame_bin(self)
def get_frame_bin(self): # Encode header encoder = Encoder() headers_frame_field = bytearray() if self._data is None: # if user didn't touch data self._data = encoder.encode(self._header_list) # encode header list self._flag = self.flag # get flag by method if self._is_padded: headers_frame_field.append(self._pad_len) # append pad length self._data += bytearray(self._pad_len) # append pad byte in pad length if self._is_priority: headers_frame_field += int_to_bytes(self._dependency_id, 4) # append dependency stream id headers_frame_field.append(self._weight) self._data = headers_frame_field + self._data # append HEADERS field return Frame.get_frame_bin(self)
def get_frame_bin(self): if self._data is None: # if user didn't touch data self._data = bytearray() self._data += int_to_bytes(self._dependency_id) # append dependency stream id self._data.append(self._weight) return Frame.get_frame_bin(self)
def get_frame_bin(self): if self._data is None: # if user didn't touch data self._data = int_to_bytes(self.error_code, 4) return Frame.get_frame_bin(self)
def get_frame_bin(self): if self._data is None: self._data = int_to_bytes(self.window_size, 4) return Frame.get_frame_bin(self)