xref: /PHP-7.4/sapi/fpm/fpm/fpm_request.h (revision e546d721)
1 	/* (c) 2007,2008 Andrei Nigmatulin */
2 
3 #ifndef FPM_REQUEST_H
4 #define FPM_REQUEST_H 1
5 
6 void fpm_request_accepting();				/* hanging in accept() */
7 void fpm_request_reading_headers();			/* start reading fastcgi request from very first byte */
8 void fpm_request_info();					/* not a stage really but a point in the php code, where all request params have become known to sapi */
9 void fpm_request_executing();				/* the script is executing */
10 void fpm_request_end(void);				/* request ended: script response have been sent to web server */
11 void fpm_request_finished();				/* request processed: cleaning current request */
12 
13 struct fpm_child_s;
14 struct timeval;
15 
16 void fpm_request_check_timed_out(struct fpm_child_s *child, struct timeval *tv, int terminate_timeout, int slowlog_timeout, int track_finished);
17 int fpm_request_is_idle(struct fpm_child_s *child);
18 const char *fpm_request_get_stage_name(int stage);
19 int fpm_request_last_activity(struct fpm_child_s *child, struct timeval *tv);
20 
21 enum fpm_request_stage_e {
22 	FPM_REQUEST_ACCEPTING = 1,
23 	FPM_REQUEST_READING_HEADERS,
24 	FPM_REQUEST_INFO,
25 	FPM_REQUEST_EXECUTING,
26 	FPM_REQUEST_END,
27 	FPM_REQUEST_FINISHED
28 };
29 
30 #endif
31