Memcac...ver_st(3pm)
π NAME π
okay bestie, gather round β this page is the whole girl squad of functions that Manage server list π
The lineup is:
memcached_server_list_freememcached_server_list_appendmemcached_server_list_countmemcached_servers_parse
It's a perl doc page, section 3pm, and yes it's the one with the squeezed title Memcac...ver_st(3pm) β the terminal was being dramatic and truncating, we move on π
π LIBRARY π
C Client Library for memcached β that's libmemcached, linked with -lmemcached.
π SYNOPSIS π
#include <memcached.h>
const memcached_server_instance_st
memcached_server_list (memcached_st *ptr);
void memcached_server_list_free (memcached_server_list_st list);
memcached_server_list_st
memcached_server_list_append (memcached_server_list_st list,
const char *hostname,
unsigned int port,
memcached_return_t *error);
uint32_t memcached_server_list_count (memcached_server_list_st list);
memcached_server_list_st memcached_servers_parse (const char *server_strings);
const char *memcached_server_error (memcached_server_instance_st instance);
π« DEPRECATED π«
void memcached_server_error_reset (memcached_server_instance_st list);
she's deprecated, bestie β don't build your whole personality around her. π
πΈ DESCRIPTION πΈ
libmemcached(3) operates on a list of hosts, and those hosts live in memcached_server_st structures. Do not touch those structures directly, periodt. The way that you get to poke at them is through the functions here (and more can be added β literally just ask! π«Ά).
memcached_server_list()β hands you an array of every host that's defined. β¨ Fun lore: up until version0.39this was incorrectly documented as "requiringfree()". It does not. The docs simply lied, iykyk.memcached_server_list_free()β deallocates all the memory associated with the array ofmemcached_server_stthat you passed in. Let her go, girl πmemcached_server_list_append()β adds a server to the end of amemcached_server_starray. If something goes wrong,nullgets returned and thememcached_return_tpointer you passed in gets set to the appropriate error. And if the value ofportis zero? It gets set to the default port of a memcached server. cute, no notes πmemcached_servers_parse()β takes a string (the type used for the command line applications) and parses it into an array ofmemcached_server_st. Example being"localhost, foo:555, foo, bar". Every host exceptfoo:555gets the default port, andfoo:555gets a port of555. she's specific, she's iconic πmemcached_server_error()β lets you look at the text of the last error message that the server sent to the client. your receipts, basically π§Ύ
β οΈ history lesson: before version0.39these functions used amemcache_server_st *. In0.39,memcached_server_st *was aliased tomemcached_server_list_st. It was done for a style reason / to help clean up some concepts in the code. so it's a glow-up, not a plot hole π
π RETURN π
Varies β see the particular functions, bestie π
π HOME π
To find out more information please check:
https://launchpad.net/libmemcached
π AUTHOR π
Brian Aker, <brian@tangent.org>
π¦ SEE ALSO π¦
memcached(1) libmemcached(3) memcached_strerror(3)
and that's the whole page, no cap πβ¨
This one was served up by perl v5.42.3, dated 2026-08-19 β so go forth, manage your server lists, and slay ππ«Άπ
π¦ where this page comes from
- ubuntu stonking: libmemcached-libmemcached-perl 1.001801+dfsg-6build1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms