Project

General

Profile

Docs InternalFastCGI » History » Revision 10

Revision 9 (Anonymous, 2007-12-17 14:26) → Revision 10/11 (stbuehler, 2009-02-17 10:15)

h1. [[TracNav(DocsToc)]] 

 <pre> 

 #!rst  
 ================= 
 FastCGI Internals 
 ================= 

 {{>toc}} --------------- 
 Module: fastcgi 
 --------------- 

 h2. .. contents:: Table of Contents 



 Description 
 =========== 

 h3. States 
 ------ 

 The FastCGI state machine currently consists of six states, 
 each of which is visited in turn as a connection is processed. 

 * init :init: 
   prepare for a connection 
 * connect :connect: 
   wait for a connection 
 * prepwrite :prepwrite: 
   build the request 
 * write :write: 
   write the request to the network 
 * read :read: 
   read the response from network and push it to the write queue 
 * close :close: 
   terminate the connection 
  
 h3. Delays 
 ------ 

 The connect, write, and read states may need to wait for an fdevent. 
 The delays are represented by loops in the state diagram below. 

 !internal-fastcgi-states.png! </pre> 

 <pre> 

 #!graphviz 
 digraph fcgistate { 
   init -> connect -> prepwrite -> write -> read -> close 
   write -> write 
   read -> read 
   connect -> connect 
 } 
 </pre>