1================= 2FastCGI Internals 3================= 4 5--------------- 6Module: fastcgi 7--------------- 8 9:Author: Jan Kneschke 10:Date: $Date: 2004/08/01 07:01:29 $ 11:Revision: $Revision: 1.1 $ 12 13:abstract: 14 This is a short summary of the state-engine which is driving the FastCGI 15 module. It describes the basic concepts and the way the different parts 16 of the module are connected. 17 18.. meta:: 19 :keywords: lighttpd, state-engine, fastcgi 20 21.. contents:: Table of Contents 22 23Description 24=========== 25 26States 27------ 28 29The state-engine is currently made of 6 states which are walk-through on 30the way each connection. 31 32:init: 33 prepare fastcgi-connection 34:connect: 35 waiting for a connection 36:prepwrite: 37 build the fastcgi-request 38:write: 39 write the fastcgi-request to the network 40:read: 41 read fastcgi-response from network and push it to the write-queue 42:close: 43 terminate the connection 44 45.. image:: fastcgi-state.png 46 47Delays 48------ 49 50connect, write and read may need to wait for an fdevent. That's the reason 51for the loop in the state-diagram. 52