comm_prot_register()
#
Register a communication protocol handler.
Prototype
PUBLIC int comm_prot_register(
const char *protocol_name,
void (*callback)(void *data, int size),
void *user_data
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
The name of the protocol to register. |
|
|
The function to handle protocol events. |
|
|
User-defined data to pass to the callback function. |
Return Value
Returns 0
on success, or a negative value on failure.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples