flux_msg_has_flag(3)

SYNOPSIS

#include <flux/core.h>

bool flux_msg_has_flag (const flux_msg_t *msg, int flag);
int flux_msg_set_flag (flux_msg_t *msg, int flag);
int flux_msg_clear_flag (flux_msg_t *msg, int flag);

int flux_msg_set_private (flux_msg_t *msg);
bool flux_msg_is_private (const flux_msg_t *msg);

int flux_msg_set_streaming (flux_msg_t *msg);
bool flux_msg_is_streaming (const flux_msg_t *msg);

int flux_msg_set_noresponse (flux_msg_t *msg);
bool flux_msg_is_noresponse (const flux_msg_t *msg);

Link with -lflux-core.

DESCRIPTION

These functions manipulate the Flux MESSAGE FLAGS.

flux_msg_has_flag() returns true if any flags in the flag bitmask are set in msg.

flux_msg_set_flag() sets all flags in the flag bitmask in msg.

flux_msg_clear_flag() clears all flags in the flag bitmask in msg.

flux_msg_is_private() returns true if FLUX_MSGFLAG_PRIVATE is set in msg.

flux_msg_set_private() sets FLUX_MSGFLAG_PRIVATE in msg.

flux_msg_is_streaming() returns true if FLUX_MSGFLAG_STREAMING is set in msg.

flux_msg_set_streaming() sets FLUX_MSGFLAG_STREAMING in msg.

flux_msg_is_noresponse() returns true if FLUX_MSGFLAG_NORESPONSE is set in msg.

flux_msg_set_noresponse() sets FLUX_MSGFLAG_NORESPONSE in msg.

MESSAGE FLAGS

The following message flags are defined by RFC 3:

FLUX_MSGFLAG_TOPIC

The message has a topic string. This flag is updated by flux_msg_set_topic().

FLUX_MSGFLAG_PAYLOAD

The message has a payload. This flag is updated by flux_msg_set_payload(), flux_msg_pack(), etc.

FLUX_MSGFLAG_NORESPONSE

The request message should not be sent a response. This flag is set by flux_rpc() when the FLUX_RPC_NORESPONSE flag is set.

FLUX_MSGFLAG_ROUTE

The request or response message has a route stack, although it may be empty. This flag is updated by flux_msg_route_enable() and flux_msg_route_disable().

FLUX_MSGFLAG_UPSTREAM

Force the broker to route a request upstream (towards the root on the tree based overlay network) relative to the sending rank. In other words, prevent the request from being handled locally. The message nodeid is interpreted as the sending rank when this flag is set.

FLUX_MSGFLAG_PRIVATE

The event message should only be forwarded to connections authenticated as the instance owner or the message userid.

FLUX_MSGFLAG_STREAMING

The request or response message is part of a streaming RPC, as defined by RFC 6. This flag is set by flux_rpc() when the FLUX_RPC_STREAMING flag is set.

FLUX_MSGFLAG_USER1

This flag is opaque to Flux's message handling semantics and may be assigned application-specific meaning in the same way as the message payload.

RETURN VALUE

flux_msg_has_flag(), flux_msg_is_private(), flux_msg_is_streaming(), and flux_msg_is_noresponse() return true if the specified flag is set, or false if if the flag is not set or the arguments are invalid.

The remaining functions return 0 on success. On error, -1 is returned, and errno is set appropriately.

ERRORS

EINVAL

Some arguments were invalid.

ENOMEM

Out of memory.

RESOURCES

Flux: http://flux-framework.org

Flux RFC: https://flux-framework.readthedocs.io/projects/flux-rfc

Issue Tracker: https://github.com/flux-framework/flux-core/issues

FLUX RFC

3/Flux Message Protocol

6/Flux Remote Procedure Call Protocol

SEE ALSO

flux_rpc(3)