libyrmcds
memcached/yrmcds client library for C
 All Data Structures Files Functions Variables Enumerations Enumerator Macros Groups Pages
yrmcds_error yrmcds_replace ( yrmcds c,
const char *  key,
size_t  key_len,
const char *  data,
size_t  data_len,
uint32_t  flags,
uint32_t  expire,
uint64_t  cas,
int  quiet,
uint32_t *  serial 
)

Send Replace/ReplaceQ command.

Parameters
cA pointer to yrmcds.
keyKey data.
key_lenLength of key.
dataData to be stored.
data_lenLength of data.
flagsFlags stored along with the data.
expireExpiration time. 0 disables expiration.
casTry compare-and-swap. 0 disables CAS.
quiet0 to send Replace, other values to send ReplaceQ.
serialA pointer to uint32_t, or NULL.
Returns
0 if succeeded. Other values indicate an error.

This function sends Replace/ReplaceQ command to the server. If serial is not NULL, the serial number of the request will be stored if the command was sent successfully.