udpc_fwrite()

udpc_fwrite()#

udpc_fwrite() formats and sends a log message over UDP using a specified format string and arguments.

Prototype

int udpc_fwrite(
    udpc_t      udpc,
    int         priority,
    const char  *format,
    ...
);

Parameters

Key

Type

Description

udpc

udpc_t

A handle to the UDP client instance.

priority

int

The priority level of the log message.

format

const char *

A format string specifying how subsequent arguments are formatted.

...

variadic

Additional arguments corresponding to the format string.


Return Value

Returns 0 on success, or -1 if an error occurs.

Notes

Internally, udpc_fwrite() formats the message using vsnprintf() and then calls udpc_write() to send the formatted log message.

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples