Port RPC interface introduced.

Usage:
1. Register handlers in incoming port with nxt_port_rpc_register_handler().
2. Use return value as a stream identifier for next nxt_port_socket_write().
This commit is contained in:
Max Romanov
2017-08-02 13:14:31 +03:00
parent 3812ffd336
commit f2e9afdf42
9 changed files with 369 additions and 0 deletions

View File

@@ -29,6 +29,9 @@ nxt_port_handler_t nxt_controller_process_port_handlers[] = {
nxt_port_mmap_handler,
nxt_port_controller_data_handler,
nxt_port_remove_pid_handler,
NULL,
nxt_port_rpc_handler,
nxt_port_rpc_handler,
};
@@ -39,6 +42,9 @@ nxt_port_handler_t nxt_worker_process_port_handlers[] = {
nxt_port_mmap_handler,
nxt_port_data_handler,
nxt_port_remove_pid_handler,
NULL,
nxt_port_rpc_handler,
nxt_port_rpc_handler,
};
@@ -49,6 +55,9 @@ nxt_port_handler_t nxt_app_process_port_handlers[] = {
nxt_port_mmap_handler,
nxt_port_app_data_handler,
nxt_port_remove_pid_handler,
NULL,
nxt_port_rpc_handler,
nxt_port_rpc_handler,
};
@@ -59,6 +68,9 @@ nxt_port_handler_t nxt_router_process_port_handlers[] = {
nxt_port_mmap_handler,
nxt_router_conf_data_handler,
nxt_port_remove_pid_handler,
NULL,
nxt_port_rpc_handler,
nxt_port_rpc_handler,
};