bin/xapian-tcpsrv.cc File Reference

#include <config.h>
#include <stdlib.h>
#include "safeerrno.h"
#include <iostream>
#include <string>
#include "gnu_getopt.h"
#include <xapian/error.h>
#include "tcpserver.h"

Include dependency graph for xapian-tcpsrv.cc:

Go to the source code of this file.

Defines

#define PROG_NAME   "xapian-tcpsrv"
#define PROG_DESC   "TCP daemon for use with Xapian's remote backend"
#define OPT_HELP   1
#define OPT_VERSION   2

Functions

static void register_user_weighting_schemes (TcpServer &server)
static void show_usage ()
int main (int argc, char **argv)

Variables

const int MSECS_IDLE_TIMEOUT_DEFAULT = 60000
const int MSECS_ACTIVE_TIMEOUT_DEFAULT = 15000
static const char * opts = "I:p:a:i:t:oqw"
static struct option long_opts []


Define Documentation

#define PROG_NAME   "xapian-tcpsrv"

Definition at line 49 of file xapian-tcpsrv.cc.

#define PROG_DESC   "TCP daemon for use with Xapian's remote backend"

Definition at line 50 of file xapian-tcpsrv.cc.

#define OPT_HELP   1

Definition at line 52 of file xapian-tcpsrv.cc.

#define OPT_VERSION   2

Definition at line 53 of file xapian-tcpsrv.cc.


Function Documentation

static void register_user_weighting_schemes ( TcpServer &  server  )  [static]

Definition at line 39 of file xapian-tcpsrv.cc.

Referenced by main().

static void show_usage (  )  [static]

Definition at line 70 of file xapian-tcpsrv.cc.

References MSECS_ACTIVE_TIMEOUT_DEFAULT, MSECS_IDLE_TIMEOUT_DEFAULT, and PROG_NAME.

int main ( int  argc,
char **  argv 
)

Definition at line 86 of file xapian-tcpsrv.cc.

References atoi(), Xapian::DB_CREATE_OR_OPEN, Xapian::Error::get_description(), gnu_getopt_long(), long_opts, MSECS_ACTIVE_TIMEOUT_DEFAULT, MSECS_IDLE_TIMEOUT_DEFAULT, OPT_HELP, OPT_VERSION, optarg, optind, opts, PACKAGE_STRING, PROG_DESC, PROG_NAME, register_user_weighting_schemes(), show_usage(), and verbose.


Variable Documentation

const int MSECS_IDLE_TIMEOUT_DEFAULT = 60000

Definition at line 46 of file xapian-tcpsrv.cc.

Referenced by main(), and show_usage().

const int MSECS_ACTIVE_TIMEOUT_DEFAULT = 15000

Definition at line 47 of file xapian-tcpsrv.cc.

Referenced by main(), and show_usage().

const char* opts = "I:p:a:i:t:oqw" [static]

Definition at line 55 of file xapian-tcpsrv.cc.

struct option long_opts[] [static]

Initial value:

 {
    {"interface",       required_argument,      0, 'I'},
    {"port",            required_argument,      0, 'p'},
    {"active-timeout",  required_argument,      0, 'a'},
    {"idle-timeout",    required_argument,      0, 'i'},
    {"timeout",         required_argument,      0, 't'},
    {"one-shot",        no_argument,            0, 'o'},
    {"quiet",           no_argument,            0, 'q'},
    {"writable",        no_argument,            0, 'w'},
    {"help",            no_argument,            0, OPT_HELP},
    {"version",         no_argument,            0, OPT_VERSION},
    {NULL, 0, 0, 0}
}

Definition at line 56 of file xapian-tcpsrv.cc.


Documentation for Xapian (version 1.0.10).
Generated on 24 Dec 2008 by Doxygen 1.5.2.