mongoose/docs/c-api/json-rpc.h/mg_rpc_dispatch.md
Dmitry Frank 23122b327c Remove old docs, rename docs_new to docs
It would be probably good idea to also remove tools/docgen.py and
asciidoc.mk, but asciidoc.mk is still mentioned under `cloud/doc`, which
may contain some useful info which we'll need at least to review before
removing.

PUBLISHED_FROM=faf454d4c52a2f07ea8ac084cf0bd11a0c9c9b3b
2016-05-15 22:07:04 +03:00

737 B

title decl_name symbol_kind signature
mg_rpc_dispatch() mg_rpc_dispatch func int mg_rpc_dispatch(const char *buf, int, char *dst, int dst_len, const char **methods, mg_rpc_handler_t *handlers);

Dispatches a JSON-RPC request.

Parses JSON-RPC request contained in buf, len. Then, dispatches the request to the correct handler method. Valid method names should be specified in NULL terminated array methods, and corresponding handlers in handlers. Result is put in dst, dst_len. Return: length of the result, which can be larger then dst_len that indicates an overflow. Overflown bytes are not written to the buffer. If method is not found, an error is automatically generated.