|
xapian-core
2.0.0
|
TCP/IP socket based RemoteDatabase implementation. More...
#include <remotetcpclient.h>
Inheritance diagram for RemoteTcpClient:
Collaboration diagram for RemoteTcpClient:Public Member Functions | |
| RemoteTcpClient (std::string_view hostname, int port, double timeout_, double timeout_connect, bool writable, int flags) | |
| Constructor. More... | |
| ~RemoteTcpClient () | |
| Destructor. More... | |
Private Member Functions | |
| void | operator= (const RemoteTcpClient &) |
| Don't allow assignment. More... | |
| RemoteTcpClient (const RemoteTcpClient &) | |
| Don't allow copying. More... | |
Static Private Member Functions | |
| static std::pair< int, std::string > | open_socket (std::string_view hostname, int port, double timeout_connect) |
| Attempt to open a TCP/IP socket connection to xapian-tcpsrv. More... | |
TCP/IP socket based RemoteDatabase implementation.
Connects via TCP/IP to an instance of xapian-tcpsrv.
Definition at line 40 of file remotetcpclient.h.
|
private |
Don't allow copying.
|
inline |
Constructor.
Attempts to open a TCP/IP connection to xapian-tcpsrv running on port port of host hostname.
| timeout_connect | Timeout for trying to connect (in seconds). |
| timeout | Timeout during communication after successfully connecting (in seconds). |
| writable | Is this a WritableDatabase? |
| flags | Xapian::DB_RETRY_LOCK or 0. |
Definition at line 77 of file remotetcpclient.h.
| RemoteTcpClient::~RemoteTcpClient | ( | ) |
Destructor.
Definition at line 47 of file remotetcpclient.cc.
|
staticprivate |
Attempt to open a TCP/IP socket connection to xapian-tcpsrv.
Connect to xapian-tcpsrv running on port port of host hostname. Give up trying to connect after timeout_connect seconds.
Note: this method is called early on during class construction before any member variables or even the base class have been initialised. To help avoid accidentally trying to use member variables or call other methods which do, this method has been deliberately made "static".
Definition at line 33 of file remotetcpclient.cc.
References TcpClient::open_socket(), and Xapian::Internal::str().
|
private |
Don't allow assignment.