xapian-core  1.4.25
Macros | Functions | Variables
xapian-tcpsrv.cc File Reference

tcp daemon for use with Xapian's remote backend More...

#include <config.h>
#include <cstdlib>
#include <iostream>
#include <string>
#include "gnu_getopt.h"
#include "xapian/constants.h"
#include "xapian/error.h"
#include "net/remotetcpserver.h"
#include "net/remoteserver.h"
#include "stringutils.h"
+ Include dependency graph for xapian-tcpsrv.cc:

Go to the source code of this file.

Macros

#define MSECS_IDLE_TIMEOUT_DEFAULT   60000
 
#define MSECS_ACTIVE_TIMEOUT_DEFAULT   15000
 
#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 (RemoteTcpServer &server)
 
static void show_usage ()
 
int main (int argc, char **argv)
 

Variables

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

Detailed Description

tcp daemon for use with Xapian's remote backend

Definition in file xapian-tcpsrv.cc.

Macro Definition Documentation

◆ MSECS_ACTIVE_TIMEOUT_DEFAULT

#define MSECS_ACTIVE_TIMEOUT_DEFAULT   15000

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

Referenced by main(), and show_usage().

◆ MSECS_IDLE_TIMEOUT_DEFAULT

#define MSECS_IDLE_TIMEOUT_DEFAULT   60000

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

Referenced by main(), and show_usage().

◆ OPT_HELP

#define OPT_HELP   1

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

Referenced by main().

◆ OPT_VERSION

#define OPT_VERSION   2

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

Referenced by main().

◆ PROG_DESC

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

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

Referenced by main().

◆ PROG_NAME

#define PROG_NAME   "xapian-tcpsrv"

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

Referenced by main(), and show_usage().

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

◆ register_user_weighting_schemes()

static void register_user_weighting_schemes ( RemoteTcpServer server)
static

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

References RemoteTcpServer::set_registry().

Referenced by main().

◆ show_usage()

static void show_usage ( )
static

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

References MSECS_ACTIVE_TIMEOUT_DEFAULT, MSECS_IDLE_TIMEOUT_DEFAULT, PROG_NAME, and STRINGIZE.

Referenced by main().

Variable Documentation

◆ long_opts

const 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}
}
#define OPT_HELP
#define no_argument
Definition: gnu_getopt.h:79
#define OPT_VERSION
#define required_argument
Definition: gnu_getopt.h:80

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

◆ opts

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

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

Referenced by main().