DB_ENV->repmgr_set_local_site()
Prev | Chapter 10. Replication Methods | Next

## DB_ENV->repmgr_set_local_site()

    #include <db.h>

    int
    DB_ENV->repmgr_set_local_site(DB_ENV *env,
        const char *host, u_int port, u_int32_t flags);

The `DB_ENV->repmgr_set_local_site()` method specifies the host identification string and port number for the local system.

The `DB_ENV->repmgr_set_local_site()` method may not be called after the DB_ENV->repmgr_start() method is called.

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

### Parameters

#### host

The site's host identification string, generally a TCP/IP host name.

#### port

The port number on which the local site is listening.

#### flags

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

### Errors

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

#### EINVAL

If this method is called from a Base API application; if the method was called after replication is started with a call to the DB_ENV->repmgr_start() method; or if an invalid flag value or parameter was specified.

### Class

DB_ENV

### See Also

Replication and Related Methods

Prev | Up | Next
DB_ENV->repmgr_set_ack_policy() | Home | DB_ENV->repmgr_site_list()