code: def write_frame(self, buf):
          '''
          Write the frame into an existing buffer.
          '''
          writer = Writer(buf)
  
          writer.write_octet(self.type()).\
              write_short(self.channel_id).\
              write_long(len(self._payload)).\
              write(self._payload).\
              write_octet(0xcef write_frame(self, buf):
          '''
          Write the frame into an existing buffer.
          '''
          writer = Writer(buf)
  
          writer.write_octet(self.type()).\
              write_short(self.channel_id).\
              write_long(len(self._payload)).\
              write(self._payload).\
              write_octet(0xce)
docs: Write the frame into an existing buffer.