|
mjsonrpc 1.0
A lightweight JSON-RPC 2.0 message parser and generator based on cJSON
|
Functions for creating and managing RPC handles. More...
Functions | |
| mjrpc_handle_t * | mjrpc_create_handle (size_t initial_capacity) |
| Create a new JSON-RPC handle. | |
| int | mjrpc_destroy_handle (mjrpc_handle_t *handle) |
| Destroy a JSON-RPC handle and free all associated memory. | |
Functions for creating and managing RPC handles.
| mjrpc_handle_t * mjrpc_create_handle | ( | size_t | initial_capacity | ) |
Create a new JSON-RPC handle.
Allocates and initializes a new mjrpc_handle_t structure with the specified initial capacity for the internal hash table.
| initial_capacity | Initial capacity of the hash table (0 for default) |
| NULL | If memory allocation failed |
| int mjrpc_destroy_handle | ( | mjrpc_handle_t * | handle | ) |
Destroy a JSON-RPC handle and free all associated memory.
Destroys the specified handle, freeing all registered method names, arguments, and the handle structure itself.
| handle | Handle to be destroyed (can be NULL) |
| MJRPC_RET_OK | If successful |
| MJRPC_RET_ERROR_HANDLE_NOT_INITIALIZED | If handle is NULL |