PageRenderTime 46ms CodeModel.GetById 44ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/library/server/httpd_connector/fcgi/src/httpd_fcgi_application.e

http://github.com/jocelyn/EiffelWebReloaded
Specman e | 71 lines | 52 code | 16 blank | 3 comment | 1 complexity | 64348dab7e8eaf427a91b1c78b6e22db MD5 | raw file
 1note
 2	description: "Summary description for {HTTPD_FCGI_APPLICATION}."
 3	legal: "See notice at end of class."
 4	status: "See notice at end of class."
 5	date: "$Date$"
 6	revision: "$Revision$"
 7
 8deferred class
 9	HTTPD_FCGI_APPLICATION
10
11inherit
12	HTTPD_APPLICATION
13
14feature {NONE} -- Initialization
15
16	initialize
17		do
18			create fcgi.make
19			create {HTTPD_FCGI_SERVER_INPUT} input.make (fcgi)
20			create {HTTPD_FCGI_SERVER_OUTPUT} output.make (fcgi)
21		end
22
23feature -- Basic operation
24
25	launch
26		local
27			res: INTEGER
28		do
29			from
30				res := fcgi.fcgi_listen
31			until
32				res < 0
33			loop
34				request_count := request_count + 1
35				call_execute (fcgi.updated_environ_variables, input, output)
36--				fcgi.fcgi_finish
37				res := fcgi.fcgi_listen
38			end
39		end
40
41feature {NONE} -- Context
42
43	request_count: INTEGER
44
45feature -- Input/Output
46
47	input: HTTPD_SERVER_INPUT
48			-- Input from client (from httpd server via FCGI)
49
50	output: HTTPD_SERVER_OUTPUT
51			-- Output to client (via httpd server/fcgi)
52
53feature {NONE} -- Implementation
54
55	fcgi: FCGI
56
57invariant
58	fcgi_attached: fcgi /= Void
59
60note
61	copyright: "Copyright (c) 1984-2011, Eiffel Software and others"
62	license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
63	source: "[
64			Eiffel Software
65			5949 Hollister Ave., Goleta, CA 93117 USA
66			Telephone 805-685-1006, Fax 805-685-6869
67			Website http://www.eiffel.com
68			Customer support http://support.eiffel.com
69		]"
70
71end