Function libzt::zts_init_allow_net_cache[][src]

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

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

This can potentially shorten (startup) times between node restarts. This allows the service to nearly instantly inform the network stack of an address to use for this peer so that it can create a transport service. This can be disabled for cases where one may not want network config details to be written to storage. This is especially useful for situations where address assignments do not change often.

See also: zts_init_allow_peer_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.