def encode_request(name, expected, updated):
    """ Encode request into client_message"""
    client_message = ClientMessage(payload_size=calculate_size(name, expected, updated))
    client_message.set_message_type(REQUEST_TYPE)
    client_message.set_retryable(RETRYABLE)
    client_message.append_str(name)
    client_message.append_long(expected)
    client_message.append_long(updated)
    client_message.update_frame_length()
    return client_message
def encode_request ( name , expected , updated ) : client_message = ClientMessage ( payload_size = calculate_size ( name , expected , updated ) ) client_message . set_message_type ( REQUEST_TYPE ) client_message . set_retryable ( RETRYABLE ) client_message . append_str ( name ) client_message . append_long ( expected ) client_message . append_long ( updated ) client_message . update_frame_length ( ) return client_message
Encode request into client_message