Oracle 5.0 Reference Manual page 1382

Table of Contents

Advertisement

To build the application, specify the
shell> gcc -o memc_basic memc_basic.c -lmemcached
Running the above sample application, after starting a
message:
shell> memc_basic
Added server successfully
Key stored successfully
15.6.3.3.1.
libmemcached
The base
libmemcached
structure that is used to interface with the
memcached_st *memcached_create (memcached_st *ptr);
Creates a new
can supply an existing, static,
Returns a pointer to the created structure, or
void memcached_free (memcached_st *ptr);
Frees the structure and memory allocated to a previously created
memcached_st *memcached_clone(memcached_st *clone, memcached_st *source);
Clones an existing
servers defined in the structure.
15.6.3.3.2.
libmemcached
The
libmemcached
to act as the list of servers used by the rest of the functions. To use memcached, you first create the
server list, and then apply the list of servers to a valid
Because the list of servers, and the list of servers within an active
manipulated separately, you can update and manage server lists while an active
interface is running.
The functions for manipulating the list of servers within a
memcached_return
memcached_server_add (memcached_st *ptr,
Adds a server, using the given
memcached_return
memcached_server_add_unix_socket (memcached_st *ptr,
Adds a Unix socket to the list of servers configured in the
unsigned int memcached_server_count (memcached_st *ptr);
Returns a count of the number of configured servers within the
memcached_server_st *
memcached_server_list (memcached_st *ptr);
Returns an array of all the defined hosts within a
memcached_return
memcached_server_push (memcached_st *ptr,
Developing a
memcached
Base Functions
functions let you create, destroy and clone the main
structure for use with the other
memcached_st
memcached_st
structure from the specified source, copying the defaults and list of
memcached
Server Functions
API uses a list of servers, stored within the
char *hostname,
unsigned int port);
hostname
memcached_server_st *list);
Application
memcached
library:
memcached
servers. The main functions are defined below:
memcached
structure, or
NULL
on failure.
NULL
libmemcached
memcached_st
and
into the
port
memcached_st
char *socket);
memcached_st
memcached_st
1362
server, should return a success
memcached_st
API functions. You
libmemcached
to have a new structured allocated.
structure.
memcached_st
memcached_server_st
object.
object can be
libmemcached
libmemcached
structure are:
structure given in ptr.
structure.
structure.
memcached_st
structure.
structure,

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents