.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32) .\" .\" 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 .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . 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 .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "Memcached::libmemcached::memcached_server_st 3pm" .TH Memcached::libmemcached::memcached_server_st 3pm "2016-07-02" "perl v5.24.1" "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" \&\fIlibmemcached\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 \&\fImemcached_server_list()\fR is used to provide an array of all defined hosts. This was incorrectly documented as \*(L"requiring \fIfree()\fR\*(R" up till version 0.39. .PP \&\fImemcached_server_list_free()\fR deallocates all memory associated with the array of memcached_server_st that you passed to it. .PP \&\fImemcached_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 \&\fImemcached_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 \*(L"localhost, foo:555, foo, bar\*(R". All hosts except foo:555 will be set to the default port, while that host will have a port of 555. .PP \&\fImemcached_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" \&\fImemcached\fR\|(1) \fIlibmemcached\fR\|(3) \fImemcached_strerror\fR\|(3)