pips_get_provider()

Updated: October 26, 2022

Get a publish/subscribe provider handle

Synopsis:

#include <pips/pips.h>
pips_provider_t* pips_get_provider(const char *opt_name)

Arguments:

opt_name
A string with the name of the publish/subscribe provider to which a handle is being retrieved, or NULL to retrieve a handle to the default provider. We recommend using NULL; see the description for details.

Library:

pips-client

Description:

This function queries the provider factory to retrieve a handle to a provider implementation. The provider can be specified by name, but it's better to pass in NULL to request the default provider. This way, you don't have to change (and hence, rebuild) the code if you want to use a different provider; you just have to update your PiPS configuration.

Returns:

On success, a provider handle (which is a pointer to a pips_provider_t object). On error, this function returns NULL and sets errno.

Errors:

  • ENOENT: The requested provider isn't registered with the framework.