def send_set_value(sock, key, value): rq = Request() rq.type = Request.SET_VALUE rq.request_set_value.key = key rq.request_set_value.value = value send_message(sock, rq) return get_response(sock)
def send_count_values(sock): rq = Request() rq.type = Request.COUNT_VALUES send_message(sock, rq) return get_response(sock)
def send_get_value(sock, key): rq = Request() rq.type = Request.GET_VALUE rq.request_get_value.key = key send_message(sock, rq) return get_response(sock)