libyrmcds
memcached/yrmcds client library for C
 All Data Structures Files Functions Variables Enumerations Enumerator Macros Groups Pages
yrmcds_error yrmcds_recv ( yrmcds c,
yrmcds_response r 
)

Receives a response packet.

Parameters
cA pointer to yrmcds.
rA pointer to yrmcds_response.
Returns
0 if succeeded. Other values indicate an error.

This function receives a response packet. If no response is available, the function will be blocked. For each c, only one thread can use this function, though command sending functions can be used in parallel.

The response data stored in r keep valid until the next call of this function or until yrmcds_close is called. r can be reused for the next call of yrmcds_recv.

This will return YRMCDS_DISCONNECTED when the socket is closed or yrmcds_shutdown is called from another thread.