*/
#include "libmemcached/common.h"
-#include "p9y/socket.hpp"
static inline void _server_init(memcached_instance_st *self, Memcached *root,
const memcached_string_t &hostname, in_port_t port, uint32_t weight,
_events &= short(~arg);
}
-memcached_instance_st *__instance_create_with(memcached_st *memc, memcached_instance_st *self,
- const memcached_string_t &hostname,
+memcached_instance_st *instance_create_with(memcached_st *memc, memcached_instance_st *self,
+ const memcached_string_t &_hostname,
const in_port_t port, uint32_t weight,
const memcached_connection_t type) {
- if (memcached_is_valid_servername(hostname) == false) {
+ if (memcached_is_valid_servername(_hostname) == false) {
memcached_set_error(*memc, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT,
memcached_literal_param("Invalid hostname provided"));
return NULL;
return NULL;
}
- _server_init(self, const_cast<memcached_st *>(memc), hostname, port, weight, type);
+ _server_init(self, const_cast<memcached_st *>(memc), _hostname, port, weight, type);
if (memc and memcached_is_udp(memc)) {
self->write_buffer_offset = UDP_DATAGRAM_HEADER_LENGTH;
return self;
}
-void __instance_free(memcached_instance_st *self) {
+void instance_free(memcached_instance_st *self) {
memcached_quit_server(self, false);
self->clear_addrinfo();
void memcached_instance_free(memcached_instance_st *self) {
if (self) {
- __instance_free(self);
+ instance_free(self);
}
}
}
memcached_string_t hostname_ = {memcached_string_make_from_cstr(source->hostname())};
- return __instance_create_with(source->root, NULL, hostname_, source->port(), source->weight,
- source->type);
+ return instance_create_with(source->root, NULL, hostname_, source->port(), source->weight,
+ source->type);
}
void set_last_disconnected_host(memcached_instance_st *self) {