+ /*
+ Here is where we pay for the non-block API. We need to remove any data sitting
+ in the queue before we start our get.
+
+ It might be optimum to bounce the connection if count > some number.
+ */
+ for (x= 0; x < ptr->number_of_hosts; x++)
+ {
+ if (memcached_server_response_count(ptr, x))
+ {
+ char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
+
+ if (ptr->flags & MEM_NO_BLOCK)
+ (void)memcached_io_write(ptr, x, NULL, 0, 1);
+
+ while(memcached_server_response_count(ptr, x))
+ (void)memcached_response(ptr, buffer, MEMCACHED_DEFAULT_COMMAND_SIZE, &ptr->result, x);
+ }
+ }
+