def transmit(self, frame):
        """
        Convert a frame object to a frame string and transmit to the server.

        :param frame: the Frame object to transmit
        """
        for listener in self.listeners.values():
            if not listener:
                continue
            try:
                listener.on_send(frame)
            except __HOLE__:
                continue

        lines = utils.convert_frame_to_lines(frame)

        packed_frame = pack(lines)

        if log.isEnabledFor(logging.DEBUG):
            log.debug("Sending frame %s", lines)
        else:
            log.info("Sending frame cmd=%r headers=%r", frame.cmd, frame.headers)

        self.send(encode(packed_frame))
dataset/ETHPy150Open jasonrbriggs/stomp.py/stomp/transport.py/BaseTransport.transmit