Berkeley DB Reference Version 5.3.33

DB_ENV->repmgr_channel()

#include <db.h>

int
DB_ENV->repmgr_channel(DB_ENV *env, int eid, DB_CHANNEL **channelp, 
    u_int32_t flags);  

The DB_ENV->repmgr_channel() method returns a DB_CHANNEL handle. This is used to create and manage custom message traffic between the sites in the replication group.

This method allocates memory for the handle, returning a pointer to the structure in the memory to which channelp refers. To release the allocated memory and discard the handle, call the DB_CHANNEL->close() method.

The DB_ENV->repmgr_channel() method may be called at any time after DB_ENV->repmgr_start() has been called with a 0 return code.

The DB_ENV->repmgr_channel() method returns a non-zero error value on failure and 0 on success.

Parameters

eid

This parameter must be set to one of the following:

channelp

References memory into which a pointer to the allocated handle is copied.

flags

This parameter is currently unused, and must be set to 0.

Errors

The DB_ENV->repmgr_channel() method may fail and return one of the following non-zero errors:

EINVAL

If this method is called from a Base API application; or if an invalid flag value or parameter was specified.

Class

DB_ENV

See Also

Replication and Related Methods