def setInterval(cluster_id, ip, port, pub_start, pub_end, priv_start, priv_end):
    s = RCP.make_socket(ip,port)
    try:
        RCP._prologue(cluster_id, s)
        cmd = RCP._int_to(RCP._SET_INTERVAL | RCP._MAGIC)
        cmd += RCP._string_option_to (pub_start)
        cmd += RCP._string_option_to (pub_end)
        cmd += RCP._string_option_to (priv_start)
        cmd += RCP._string_option_to (priv_end)
        s.send(cmd)
        RCP.check_error_code(s)
    finally:
        s.close()
def setInterval(cluster_id, ip, port, pub_start, pub_end, priv_start,
                priv_end):
    s = RCP.make_socket(ip, port)
    try:
        RCP._prologue(cluster_id, s)
        cmd = RCP._int_to(RCP._SET_INTERVAL | RCP._MAGIC)
        cmd += RCP._string_option_to(pub_start)
        cmd += RCP._string_option_to(pub_end)
        cmd += RCP._string_option_to(priv_start)
        cmd += RCP._string_option_to(priv_end)
        s.send(cmd)
        RCP.check_error_code(s)
    finally:
        s.close()