projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Additional doc updates.
[m6w6/libmemcached]
/
docs
/
man
/
libmemcached_examples.3
diff --git
a/docs/man/libmemcached_examples.3
b/docs/man/libmemcached_examples.3
index 64d069d14958c0bf722ce6082eb13da4154ff6d0..d274724c48176e4b1b9a94a5ee1983e3bb254c95 100644
(file)
--- a/
docs/man/libmemcached_examples.3
+++ b/
docs/man/libmemcached_examples.3
@@
-1,4
+1,4
@@
-.TH "LIBMEMCACHED_EXAMPLES" "3" "April 0
8
, 2011" "0.47" "libmemcached"
+.TH "LIBMEMCACHED_EXAMPLES" "3" "April 0
9
, 2011" "0.47" "libmemcached"
.SH NAME
libmemcached_examples \- libmemcached Documentation
.
.SH NAME
libmemcached_examples \- libmemcached Documentation
.
@@
-56,30
+56,16
@@
finished.
.sp
.nf
.ft C
.sp
.nf
.ft C
-memcached_server_st *servers;
-memcached_st *memc= memcached_create(NULL);
-char servername[]= "0.example.com";
-
-servers= memcached_server_list_append(NULL, servername, 400, &rc);
-
-for (x= 0; x < 20; x++)
+const char *config_string= "\-\-SERVER=host10.example.com \-\-SERVER=host11.example.com \-\-SERVER=host10.example.com"
+memcached_st *memc= memcached_create_with_options(config_string, strlen(config_string);
{
{
- char buffer[SMALL_STRING_LEN];
-
- snprintf(buffer, SMALL_STRING_LEN, "%u.example.com", 400+x);
- servers= memcached_server_list_append(servers, buffer, 401, &rc);
+ ...
}
}
-rc= memcached_server_push(memc, servers);
-memcached_server_free(servers);
memcached_free(memc);
.ft P
.fi
.sp
memcached_free(memc);
.ft P
.fi
.sp
-In the above code you create a \fBmemcached_st\fP object that you then feed in a
-single host into. In the for loop you build a \fBmemcached_server_st\fPpointer that you then later feed via memcached_server_push() into the
-\fBmemcached_st\fP structure.
-.sp
-You can reuse the \fBmemcached_server_st\fP object with multile \fBmemcached_st\fPstructures.
+In the above code you create a \fBmemcached_st\fP object with three server by making use of \fImemcached_create_with_options(3)\fP.
.SH ADDING A VALUE TO THE SERVER
.sp
.nf
.SH ADDING A VALUE TO THE SERVER
.sp
.nf
@@
-147,7
+133,7
@@
To find out more information please check:
.SH AUTHOR
Brian Aker
.SH COPYRIGHT
.SH AUTHOR
Brian Aker
.SH COPYRIGHT
-2011, Brian Aker
+2011, Brian Aker
DataDifferential, http://datadifferential.com/
.\" Generated by docutils manpage writer.
.\"
.
.\" Generated by docutils manpage writer.
.\"
.