code: def on_transmit(self, broker):
          
          _vv and IOLOG.debug('%r.on_transmit()', self)
  
          if self._output_buf:
              buf = self._output_buf.popleft()
              written = self.transmit_side.write(buf)
              if not written:
                  _v and LOG.debug('%r.on_transmit(): disconnection detected', self)
                  self.on_disconnect(broker)
                  return
              elif written != len(buf):
                  self._output_buf.appendleft(BufferType(buf, written))
  
              _vv and IOLOG.debug('%r.on_transmit() -> len %d', self, written)
              self._output_buf_len -= written
  
          if not self._output_buf:
              broker._stop_transmit(self)
docs: Transmit buffered messages.