'Put the "immidiatedly send" queue content on the wire. Blocks until at least one byte sent.'

def flush_queue(self):

    if self.sendbuffer:
        try:
            sent = self._send(self.sendbuffer)
        except:
            self.set_socket_state(SOCKET_DEAD)
            self.DEBUG('Socket    error    while    sending    data', 'error')
            return self.terminate_stream()
        self.DEBUG(((`self.fileno()` + '    ') + self.sendbuffer[:sent]), 'sent')
        self._stream_pos_sent += sent
        self.sendbuffer = self.sendbuffer[sent:]
        self._stream_pos_delivered = self._stream_pos_sent
        while (self.deliver_key_queue and (self._stream_pos_delivered > self.deliver_key_queue[0])):
            del self.deliver_queue_map[self.deliver_key_queue[0]]
            self.deliver_key_queue.remove(self.deliver_key_queue[0])
