grpc_session_attr_set_np
- Sets session attributes.
grpc_error_t grpc_session_attr_set_np(grpc_session_attr_t_np *attr,
grpc_session_attr_name_t_np name,
void *value)
grpc_session_attr_t_np *attr
grpc_session_attr_name_t_np name
void *value
typedef enum grpc_session_attr_name_e_np { GRPC_SESSION_ATTR_WAIT_ARG_TRANSFER, /* grpc_argument_transfer_t_np */ GRPC_SESSION_ATTR_SESSION_TIMEOUT, /* int */ GRPC_SESSION_ATTR_TRANSFER_TIMEOUT_ARGUMENT, /* int */ GRPC_SESSION_ATTR_TRANSFER_TIMEOUT_RESULT, /* int */ GRPC_SESSION_ATTR_TRANSFER_TIMEOUT_CALLBACK_ARGUMENT, /* int */ GRPC_SESSION_ATTR_TRANSFER_TIMEOUT_CALLBACK_RESULT, /* int */ } grpc_session_attr_name_t_np;
GRPC_SESSION_ATTR_WAIT_ARG_TRANSFER
This flag specifies whether or not to wait for the transfer of arguments in an asynchronous RPC.
The default is to wait for the transfer.
The value set up with this attribute is shown below.
GRPC_ARGUMENT_TRANSFER_WAIT
It waits for the end of transfer argument.
GRPC_ARGUMENT_TRANSFER_NOWAIT
It does not wait for the end of transfer argument.
GRPC_ARGUMENT_TRANSFER_COPY
The copy of an argument is made.
GRPC_SESSION_ATTR_SESSION_TIMEOUT
This specifies the RPC execution timeout time. The unit is in second.
The details of this attribute is described in section 4.3.6, The client configuration file FUNCTION_INFO section.
GRPC_SESSION_ATTR_TRANSFER_TIMEOUT_*
This specifies the RPC data transfer timeout time. The unit is in second.
The details of this attribute is described in section 4.3.6, The client configuration file FUNCTION_INFO section.
The grpc_session_attr_set_np() function sets the values of session attributes.
This function is MT-safe.
If successful, GRPC_NO_ERROR is returned. In the case of an error, Error code is returned.
GRPC_NOT_INITIALIZED
GRPC_OTHER_ERROR_CODE