X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fserver.h;h=b08720148f79476f1447a20bc5ca37939b00b34e;hb=8dbf5dfc11d59551dbe433dc45e8c1283cbd939a;hp=6a2ae5eea1a77dfbf2a7f113597868793c956b25;hpb=c52c930e6cb28a0c48c63992135691111fd9f779;p=m6w6%2Flibmemcached diff --git a/libmemcached/server.h b/libmemcached/server.h index 6a2ae5ee..b0872014 100644 --- a/libmemcached/server.h +++ b/libmemcached/server.h @@ -17,14 +17,13 @@ struct memcached_server_st { struct { bool is_allocated:1; bool is_initialized:1; - bool sockaddr_inited:1; bool is_shutting_down:1; } options; uint32_t number_of_hosts; uint32_t cursor_active; in_port_t port; int cached_errno; - int fd; + memcached_socket_t fd; uint32_t io_bytes_sent; /* # bytes sent since last read */ uint32_t server_failure_counter; uint32_t weight; @@ -32,9 +31,13 @@ struct memcached_server_st { bool is_corked:1; bool is_dead:1; } state; - uint8_t major_version; - uint8_t micro_version; - uint8_t minor_version; + struct { + uint32_t read; + uint32_t write; + } io_wait_count; + uint8_t major_version; // Default definition of UINT8_MAX means that it has not been set. + uint8_t micro_version; // ditto + uint8_t minor_version; // ditto memcached_connection_t type; char *read_ptr; char *cached_server_error; @@ -42,6 +45,7 @@ struct memcached_server_st { size_t read_data_length; size_t write_buffer_offset; struct addrinfo *address_info; + struct addrinfo *address_info_next; time_t next_retry; const memcached_st *root; uint64_t limit_maxbytes; @@ -92,6 +96,13 @@ LIBMEMCACHED_API memcached_return_t memcached_server_add(memcached_st *ptr, const char *hostname, in_port_t port); +LIBMEMCACHED_LOCAL + memcached_return_t memcached_server_add_parsed(memcached_st *ptr, + const char *hostname, + size_t hostname_length, + in_port_t port, + uint32_t weight); + LIBMEMCACHED_API memcached_return_t memcached_server_add_udp_with_weight(memcached_st *ptr, const char *hostname,