Function libzt::zts_init_allow_peer_cache[][src]

pub unsafe extern "C" fn zts_init_allow_peer_cache(allowed: c_uint) -> c_int
Expand description

@brief Enable or disable whether the node will cache peer details (enabled by default when zts_init_from_storage() is used.) Must be called before zts_node_start().

This can potentially shorten (connection) times between node restarts. This allows the service to re-use previously discovered paths to a peer, this prevents the service from having to go through the entire transport-triggered link provisioning process. This is especially useful for situations where paths to peers do not change often. This is enabled by default and can be disabled for cases where one may not want peer details to be written to storage.

See also: zts_init_allow_net_cache()

@param enabled Whether or not this feature is enabled @return ZTS_ERR_OK if successful, ZTS_ERR_SERVICE if the node experiences a problem, ZTS_ERR_ARG if invalid argument.