/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

  1. note
  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. deferred class
  8. HTTPD_FCGI_APPLICATION
  9. inherit
  10. HTTPD_APPLICATION
  11. feature {NONE} -- Initialization
  12. initialize
  13. do
  14. create fcgi.make
  15. create {HTTPD_FCGI_SERVER_INPUT} input.make (fcgi)
  16. create {HTTPD_FCGI_SERVER_OUTPUT} output.make (fcgi)
  17. end
  18. feature -- Basic operation
  19. launch
  20. local
  21. res: INTEGER
  22. do
  23. from
  24. res := fcgi.fcgi_listen
  25. until
  26. res < 0
  27. loop
  28. request_count := request_count + 1
  29. call_execute (fcgi.updated_environ_variables, input, output)
  30. -- fcgi.fcgi_finish
  31. res := fcgi.fcgi_listen
  32. end
  33. end
  34. feature {NONE} -- Context
  35. request_count: INTEGER
  36. feature -- Input/Output
  37. input: HTTPD_SERVER_INPUT
  38. -- Input from client (from httpd server via FCGI)
  39. output: HTTPD_SERVER_OUTPUT
  40. -- Output to client (via httpd server/fcgi)
  41. feature {NONE} -- Implementation
  42. fcgi: FCGI
  43. invariant
  44. fcgi_attached: fcgi /= Void
  45. note
  46. copyright: "Copyright (c) 1984-2011, Eiffel Software and others"
  47. license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
  48. source: "[
  49. Eiffel Software
  50. 5949 Hollister Ave., Goleta, CA 93117 USA
  51. Telephone 805-685-1006, Fax 805-685-6869
  52. Website http://www.eiffel.com
  53. Customer support http://support.eiffel.com
  54. ]"
  55. end