00001
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef XAPIAN_INCLUDED_REMOTETCPSERVER_H
00022 #define XAPIAN_INCLUDED_REMOTETCPSERVER_H
00023
00024 #include "tcpserver.h"
00025
00026 #include <xapian/database.h>
00027 #include <xapian/visibility.h>
00028
00029 #include <string>
00030 #include <vector>
00031
00036 class XAPIAN_VISIBILITY_DEFAULT RemoteTcpServer : public TcpServer {
00038 void operator=(const RemoteTcpServer &);
00039
00041 RemoteTcpServer(const RemoteTcpServer &);
00042
00047 const std::vector<std::string> dbpaths;
00048
00050 bool writable;
00051
00053 double active_timeout;
00054
00056 double idle_timeout;
00057
00059 int accept_connection();
00060
00061 public:
00076 RemoteTcpServer(const std::vector<std::string> &dbpaths_,
00077 const std::string &host, int port,
00078 double active_timeout, double idle_timeout,
00079 bool writable, bool verbose);
00080
00085 void handle_one_connection(int socket);
00086 };
00087
00088 #endif // XAPIAN_INCLUDED_REMOTETCPSERVER_H