flux_request_encode(3)
SYNOPSIS
#include <flux/core.h>
flux_msg_t *flux_request_encode (const char *topic, const char *s);
flux_msg_t *flux_request_encode_raw (const char *topic,
void *data,
size_t len);
Link with -lflux-core.
DESCRIPTION
flux_request_encode()
encodes a request message with topic string
topic
and optional NULL terminated string payload s
. The newly
constructed message that is returned must be destroyed with
flux_msg_destroy()
.
flux_request_encode_raw()
encodes a request message with topic
string topic
. If data
is non-NULL its contents will be used
as the message payload, and the payload type set to raw.
RETURN VALUE
These functions return a message on success. On error, NULL is
returned, and errno
is set appropriately.
ERRORS
- EINVAL
The topic argument was NULL or s is not NULL terminated.
- ENOMEM
Memory was unavailable.
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