35 #define PROG_NAME "xapian-replicate-server" 36 #define PROG_DESC "Service database replication requests from clients" 42 cout <<
"Usage: " PROG_NAME " [OPTIONS] DATABASE_PARENT_DIRECTORY\n\n" 44 " -I, --interface=ADDR listen on interface ADDR\n" 45 " -p, --port=PORT port to listen on\n" 46 " -o, --one-shot serve a single connection and exit\n" 47 " --help display this help and exit\n" 48 " --version output version information and exit\n";
52 main(
int argc,
char **argv)
54 const char *
opts =
"I:p:o";
55 static const struct option long_opts[] = {
67 bool one_shot =
false;
100 string dbpath(argv[
optind]);
Wrappers to allow GNU getopt to be used cleanly from C++ code.
int gnu_getopt_long(int argc_, char *const *argv_, const char *shortopts_, const struct option *longopts_, int *optind_)
int main(int argc, char **argv)
Public interfaces for the Xapian library.
#define required_argument
std::string get_description() const
Return a string describing this object.
All exceptions thrown by Xapian are subclasses of Xapian::Error.
TCP/IP replication server class.