| 
    xapian-core
    1.4.29
    
   | 
 
TCP/IP socket based server for RemoteDatabase. More...
#include <remotetcpserver.h>
 Inheritance diagram for RemoteTcpServer:
 Collaboration diagram for RemoteTcpServer:Public Member Functions | |
| RemoteTcpServer (const std::vector< std::string > &dbpaths_, const std::string &host, int port, double active_timeout, double idle_timeout, bool writable, bool verbose) | |
| Construct a RemoteTcpServer for a Database and start listening for connections.  More... | |
| void | set_registry (const Xapian::Registry ®_) | 
| Set the registry used for (un)serialisation.  More... | |
| void | handle_one_connection (int socket) | 
| Handle a single connection on an already connected socket.  More... | |
Private Member Functions | |
| void | operator= (const RemoteTcpServer &) | 
| Don't allow assignment.  More... | |
| RemoteTcpServer (const RemoteTcpServer &) | |
| Don't allow copying.  More... | |
| int | accept_connection () | 
| Accept a connection and return the file descriptor for it.  More... | |
Private Attributes | |
| const std::vector< std::string > | dbpaths | 
| Paths to the databases we will open.  More... | |
| bool | writable | 
| Is this a WritableDatabase?  More... | |
| double | active_timeout | 
| Timeout between messages during a single operation (in seconds).  More... | |
| double | idle_timeout | 
| Timeout between operations (in seconds).  More... | |
| Xapian::Registry | reg | 
| Registry used for (un)serialisation.  More... | |
TCP/IP socket based server for RemoteDatabase.
This class implements the server used by xapian-tcpsrv.
Definition at line 37 of file remotetcpserver.h.
      
  | 
  private | 
Don't allow copying.
| RemoteTcpServer::RemoteTcpServer | ( | const std::vector< std::string > & | dbpaths_, | 
| const std::string & | host, | ||
| int | port, | ||
| double | active_timeout, | ||
| double | idle_timeout, | ||
| bool | writable, | ||
| bool | verbose | ||
| ) | 
Construct a RemoteTcpServer for a Database and start listening for connections.
The RemoteTcpServer constructor, taking a database and a listening port.
| dbpaths_ | The path(s) to the database(s) we should open. | 
| host | The hostname or address for the interface to listen on (or "" to listen on all interfaces). | 
| port | The TCP port number to listen on. | 
| active_timeout | Timeout between messages during a single operation (in seconds). | 
| idle_timeout | Timeout between operations (in seconds). | 
| writable | Should we open the DB for writing? | 
| verbose | Should we produce output when connections are made or lost? | 
Definition at line 37 of file remotetcpserver.cc.
      
  | 
  private | 
Accept a connection and return the file descriptor for it.
| void RemoteTcpServer::handle_one_connection | ( | int | socket | ) | 
Handle a single connection on an already connected socket.
This method may be called by multiple threads.
Definition at line 48 of file remotetcpserver.cc.
References active_timeout, dbpaths, Xapian::Error::get_description(), idle_timeout, reg, RemoteServer::run(), RemoteServer::set_registry(), verbose, and writable.
      
  | 
  private | 
Don't allow assignment.
      
  | 
  inline | 
Set the registry used for (un)serialisation.
Definition at line 86 of file remotetcpserver.h.
Referenced by register_user_weighting_schemes().
      
  | 
  private | 
Timeout between messages during a single operation (in seconds).
Definition at line 54 of file remotetcpserver.h.
Referenced by handle_one_connection().
      
  | 
  private | 
Paths to the databases we will open.
Contains exactly one entry if writable, and at least one if not.
Definition at line 48 of file remotetcpserver.h.
Referenced by handle_one_connection().
      
  | 
  private | 
Timeout between operations (in seconds).
Definition at line 57 of file remotetcpserver.h.
Referenced by handle_one_connection().
      
  | 
  private | 
Registry used for (un)serialisation.
Definition at line 60 of file remotetcpserver.h.
Referenced by handle_one_connection().
      
  | 
  private | 
Is this a WritableDatabase?
Definition at line 51 of file remotetcpserver.h.
Referenced by handle_one_connection().