.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Memcached::libmemcached::memcached_server_st 3pm" .TH Memcached::libmemcached::memcached_server_st 3pm 2024-03-07 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME memcached_server_list_free, memcached_server_list_append, memcached_server_list_count, memcached_servers_parse \- Manage server list .SH LIBRARY .IX Header "LIBRARY" C Client Library for memcached (libmemcached, \-lmemcached) .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& #include \& \& 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); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" \&\fBlibmemcached\fR\|(3) operates on a list of hosts which are stored in memcached_server_st structures. You should not modify these structures directly. Functions are provided to modify these structures (and more can be added, just ask!). .PP \&\fBmemcached_server_list()\fR is used to provide an array of all defined hosts. This was incorrectly documented as "requiring \fBfree()\fR" up till version 0.39. .PP \&\fBmemcached_server_list_free()\fR deallocates all memory associated with the array of memcached_server_st that you passed to it. .PP \&\fBmemcached_server_list_append()\fR adds a server to the end of a memcached_server_st array. On error null will be returned and the memcached_return_t pointer you passed into the function will be set with the appropriate error. If the value of port is zero, it is set to the default port of a memcached server. .PP \&\fBmemcached_servers_parse()\fR takes a string, the type that is used for the command line applications, and parse it to an array of memcached_server_st. The example is "localhost, foo:555, foo, bar". All hosts except foo:555 will be set to the default port, while that host will have a port of 555. .PP \&\fBmemcached_server_error()\fR can be used to look at the text of the last error message sent by the server to to the client. .PP Before version 0.39 theses functions used a memcache_server_st *. In 0.39 memcached_server_st * was aliased to memcached_server_list_st. This was done for a style reason/to help clean up some concepts in the code. .SH RETURN .IX Header "RETURN" Varies, see particular functions. .SH HOME .IX Header "HOME" To find out more information please check: .SH AUTHOR .IX Header "AUTHOR" Brian Aker, .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBmemcached\fR\|(1) \fBlibmemcached\fR\|(3) \fBmemcached_strerror\fR\|(3)