- memset(buffer, 0, MEMCACHED_DEFAULT_COMMAND_SIZE);
- send_length= read(ptr->hosts[server_key].fd, buffer, MEMCACHED_DEFAULT_COMMAND_SIZE);
+ rc= memcached_do(ptr, server_key, buffer, send_length, 1);
+ if (rc != MEMCACHED_SUCCESS)
+ return rc;
+
+ rc= memcached_response(ptr, buffer, MEMCACHED_DEFAULT_COMMAND_SIZE, NULL, server_key);