Skip to content

Latest commit

 

History

History
61 lines (38 loc) · 1.25 KB

flux_request_encode.rst

File metadata and controls

61 lines (38 loc) · 1.25 KB

flux_request_encode(3)

c

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,
                                     int 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

SEE ALSO

:man3:flux_response_decode, :man3:flux_rpc