'Send all pending frames.'

def sendFrames(self):

    if (self.state != FRAMES):
        return
    if (self.flavor == HYBI00):
        maker = make_hybi00_frame
    elif (self.flavor in (HYBI07, HYBI10, RFC6455)):
        if self.do_binary_frames:
            maker = make_hybi07_frame_dwim
        else:
            maker = make_hybi07_frame
    else:
        raise WSException(('Unknown    flavor    %r' % self.flavor))
    for frame in self.pending_frames:
        if self.codec:
            frame = encoders[self.codec](frame)
        packet = maker(frame)
        self.transport.write(packet)
    self.pending_frames = []
