Parsec

ParsecClientSendUserData

ParsecStatusParsecClientSendUserData(Parsec *
ps,
uint32_t
id,
const char *
text
)

Send a user-defined string to the host.

The host may set an optional callback to process user-defined messages. These messages may be any type of data serialized via JSON or XML. Note: Parsec's peer-to-peer protocol is optimized for targeted bitrate, low-latency media streaming and not bulk file transfer. Very large messages sent via this function may unnecessarily burden both the client and the host.

Parameters

DirectionNameDescription
inpsParsec instance returned by ParsecInit.
inidUser-defined message ID considered by the host.
intextNull-terminated UTF-8 string.

Returns

PARSEC_OK if the message was sent successfully, otherwise a ParsecStatus error value.