Files
nginx-unit/src/nxt_router_request.h
Max Romanov 8359560612 Introducing the shared application port.
This is the port shared between all application processes which use it to pass
requests for processing.  Using it significantly simplifies the request
processing code in the router.  The drawback is 2 more file descriptors per each
configured application and more complex libunit message wait/read code.
2020-08-11 19:20:15 +03:00

42 lines
848 B
C

/*
* Copyright (C) NGINX, Inc.
*/
#ifndef _NXT_ROUTER_REQUEST_H_INCLUDED_
#define _NXT_ROUTER_REQUEST_H_INCLUDED_
typedef struct nxt_msg_info_s {
nxt_buf_t *buf;
nxt_fd_t body_fd;
nxt_port_mmap_tracking_t tracking;
nxt_work_handler_t completion_handler;
} nxt_msg_info_t;
typedef enum {
NXT_APR_NEW_PORT,
NXT_APR_REQUEST_FAILED,
NXT_APR_GOT_RESPONSE,
NXT_APR_UPGRADE,
NXT_APR_CLOSE,
} nxt_apr_action_t;
typedef struct {
uint32_t stream;
nxt_app_t *app;
nxt_port_t *app_port;
nxt_apr_action_t apr_action;
nxt_http_request_t *request;
nxt_msg_info_t msg_info;
nxt_bool_t rpc_cancel;
} nxt_request_rpc_data_t;
#endif /* _NXT_ROUTER_REQUEST_H_INCLUDED_ */