1190Smax.romanov@nginx.com 2190Smax.romanov@nginx.com /* 3190Smax.romanov@nginx.com * Copyright (C) Max Romanov 4190Smax.romanov@nginx.com * Copyright (C) NGINX, Inc. 5190Smax.romanov@nginx.com */ 6190Smax.romanov@nginx.com 7190Smax.romanov@nginx.com #ifndef _NXT_PORT_RPC_H_INCLUDED_ 8190Smax.romanov@nginx.com #define _NXT_PORT_RPC_H_INCLUDED_ 9190Smax.romanov@nginx.com 10190Smax.romanov@nginx.com 11190Smax.romanov@nginx.com typedef void (*nxt_port_rpc_handler_t)(nxt_task_t *task, 12190Smax.romanov@nginx.com nxt_port_recv_msg_t *msg, void *data); 13190Smax.romanov@nginx.com 14*1487Smax.romanov@nginx.com nxt_int_t nxt_port_rpc_init(void); 15*1487Smax.romanov@nginx.com 16190Smax.romanov@nginx.com uint32_t nxt_port_rpc_register_handler(nxt_task_t *task, nxt_port_t *port, 17190Smax.romanov@nginx.com nxt_port_rpc_handler_t ready_handler, nxt_port_rpc_handler_t error_handler, 18190Smax.romanov@nginx.com nxt_pid_t peer, void *data); 19318Smax.romanov@nginx.com void *nxt_port_rpc_register_handler_ex(nxt_task_t *task, nxt_port_t *port, 20318Smax.romanov@nginx.com nxt_port_rpc_handler_t ready_handler, nxt_port_rpc_handler_t error_handler, 21318Smax.romanov@nginx.com size_t ex_size); 22318Smax.romanov@nginx.com 23318Smax.romanov@nginx.com uint32_t nxt_port_rpc_ex_stream(void *ex); 24318Smax.romanov@nginx.com void nxt_port_rpc_ex_set_peer(nxt_task_t *task, nxt_port_t *port, 25318Smax.romanov@nginx.com void *ex, nxt_pid_t peer); 26318Smax.romanov@nginx.com 27190Smax.romanov@nginx.com void nxt_port_rpc_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg); 28190Smax.romanov@nginx.com void nxt_port_rpc_remove_peer(nxt_task_t *task, nxt_port_t *port, 29190Smax.romanov@nginx.com nxt_pid_t peer); 30190Smax.romanov@nginx.com void nxt_port_rpc_cancel(nxt_task_t *task, nxt_port_t *port, uint32_t stream); 31583Smax.romanov@nginx.com void nxt_port_rpc_close(nxt_task_t *task, nxt_port_t *port); 32190Smax.romanov@nginx.com 33190Smax.romanov@nginx.com 34190Smax.romanov@nginx.com #endif /* _NXT_PORT_RPC_H_INCLUDED_ */ 35190Smax.romanov@nginx.com 36