'Write a CQL protocol frame header.'

@staticmethod
def _write_header(f, version, flags, stream_id, opcode, length):

    pack = (v3_header_pack if (version >= 3) else header_pack)
    f.write(pack(version, flags, stream_id, opcode))
    write_int(f, length)
