comm_prot_register()

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

protocol_name

const char *

The name of the protocol to register.

callback

void (*)(void *, int)

The function to handle protocol events.

user_data

void *

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