memcached.c File Reference

#include "memcached.h"
#include <sys/stat.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <signal.h>
#include <sys/resource.h>
#include <sys/uio.h>
#include <ctype.h>
#include <stdarg.h>
#include <pwd.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <assert.h>
#include <limits.h>
#include <sysexits.h>

Include dependency graph for memcached.c:


Classes

struct  token_s

Defines

#define REALTIME_MAXDELTA   60*60*24*30
#define INCR_MAX_STORAGE_LEN   24
#define COMMAND_TOKEN   0
#define SUBCOMMAND_TOKEN   1
#define KEY_TOKEN   1
#define MAX_TOKENS   8

Typedefs

typedef struct token_s token_t

Enumerations

enum  try_read_result { READ_DATA_RECEIVED, READ_NO_DATA_RECEIVED, READ_ERROR, READ_MEMORY_ERROR }
enum  transmit_result { TRANSMIT_COMPLETE, TRANSMIT_INCOMPLETE, TRANSMIT_SOFT_ERROR, TRANSMIT_HARD_ERROR }

Functions

connconn_from_freelist ()
bool conn_add_to_freelist (conn *c)
connconn_new (const int sfd, enum conn_states init_state, const int event_flags, const int read_buffer_size, enum protocol prot, struct event_base *base)
enum store_item_type do_store_item (item *it, int comm, conn *c)
void append_stat (const char *name, ADD_STAT add_stats, conn *c, const char *fmt,...)
char * do_add_delta (conn *c, item *it, const bool incr, const int64_t delta, char *buf)
void do_accept_new_conns (const bool do_accept)
int main (int argc, char **argv)

Variables

struct stats stats
 exported globals
struct settings settings
time_t process_started
volatile rel_time_t current_time

Define Documentation

#define COMMAND_TOKEN   0

#define INCR_MAX_STORAGE_LEN   24

#define KEY_TOKEN   1

#define MAX_TOKENS   8

#define REALTIME_MAXDELTA   60*60*24*30

#define SUBCOMMAND_TOKEN   1


Typedef Documentation

typedef struct token_s token_t


Enumeration Type Documentation

Enumerator:
TRANSMIT_COMPLETE 
TRANSMIT_INCOMPLETE  All done writing.

TRANSMIT_SOFT_ERROR  More data remaining to write.

TRANSMIT_HARD_ERROR  Can't write any more right now.

Can't write (c->state is set to conn_closing)

Enumerator:
READ_DATA_RECEIVED 
READ_NO_DATA_RECEIVED 
READ_ERROR 
READ_MEMORY_ERROR  an error occured (on the socket) (or client closed connection)

failed to allocate more memory


Function Documentation

void append_stat ( const char *  name,
ADD_STAT  add_stats,
conn c,
const char *  fmt,
  ... 
)

bool conn_add_to_freelist ( conn c  ) 

Here is the caller graph for this function:

conn* conn_from_freelist ( void   ) 

Here is the caller graph for this function:

conn* conn_new ( const int  sfd,
enum conn_states  init_state,
const int  event_flags,
const int  read_buffer_size,
enum protocol  prot,
struct event_base *  base 
)

Here is the call graph for this function:

void do_accept_new_conns ( const bool  do_accept  ) 

Here is the call graph for this function:

Here is the caller graph for this function:

char* do_add_delta ( conn c,
item it,
const bool  incr,
const int64_t  delta,
char *  buf 
)

Here is the call graph for this function:

Here is the caller graph for this function:

enum store_item_type do_store_item ( item it,
int  comm,
conn c 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int main ( int  argc,
char **  argv 
)

Here is the call graph for this function:


Variable Documentation

struct stats stats

exported globals


Generated on Fri Apr 17 16:28:18 2009 for memcached by  doxygen 1.5.8