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