+ bool end()
+ {
+ return _end;
+ }
+
+ void start();
+
+ void set_end()
+ {
+ rc= MEMCACHED_SUCCESS;
+ _end= true;
+ }
+
+ void set_server()
+ {
+ _is_server= true;
+ }
+
+ void unset_server()
+ {
+ _is_server= false;
+ }
+
+ bool is_server()
+ {
+ return _is_server;
+ }
+
+ const char *set_hostname(const char *str, size_t size)
+ {
+ size_t copy_length= std::min((size_t)NI_MAXHOST, size);
+ memcpy(_hostname, str, copy_length);
+ _hostname[copy_length]= 0;
+
+ return _hostname;
+ }
+
+ const char *hostname()
+ {
+ return _hostname;
+ }
+