'This appends the fully generated frame to send to the broker to the
output buffer which will be then sent via the connection adapter.
:param frame_value: The frame to write
:type frame_value:  pika.frame.Frame|pika.frame.ProtocolHeader
:raises: exceptions.ConnectionClosed'

def _send_frame(self, frame_value):

    if self.is_closed:
        LOGGER.error('Attempted    to    send    frame    when    closed')
        raise exceptions.ConnectionClosed
    marshaled_frame = frame_value.marshal()
    self.bytes_sent += len(marshaled_frame)
    self.frames_sent += 1
    self.outbound_buffer.append(marshaled_frame)
    self._flush_outbound()
    if self.params.backpressure_detection:
        self._detect_backpressure()
