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