#include <db_cxx.h> int DbEnv::repmgr_site(const char * host, u_int16_t port, DB_SITE **sitep, u_int32_t flags);
The DbEnv::repmgr_site()
method returns a
DbSite handle that defines a site's
host/port network address. You use the DbSite
handle to configure and manage replication sites.
This method allocates memory for the handle, returning a pointer to the structure in the memory to which sitep refers. To release the allocated memory and discard the handle, call the DbSite::close() method.
You must use the exact same host identification string and port number to refer to a given site throughout your application and on each of its sites.
The DbEnv::repmgr_site()
method may be called at any time
after the environment handle has been created.
The DbEnv::repmgr_site()
method either returns a non-zero error value or throws an
exception that encapsulates a non-zero error value on
failure, and returns 0 on success.
The DbEnv::repmgr_site()
method may fail and throw a DbException
exception, encapsulating one of the following non-zero errors, or return one
of the following non-zero errors: