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