Implemented WSF_RESPONSE.put_error (...) and related

Added WSF_RESPONSE.put_character
Renamed  WGI_OUTPUT_STREAM.put_character_8 as put_character  to follow style of put_string  (and not put_string_8)
Refactored the WSF_DEFAULT_SERVICE_LAUNCHER
Added WSF_DEFAULT_SERVICE to be more user friendly
Splitted the wsf/default/ libraries to have wsf/connector/... and being able to handle more than one connector in the same application
This commit is contained in:
Jocelyn Fiat
2012-03-20 10:29:55 +01:00
parent 71d5dc4795
commit 8344607eb6
63 changed files with 1238 additions and 407 deletions

View File

@@ -55,6 +55,14 @@ feature -- FCGI output
io.put_string (a_str)
end
feature -- Error
put_error (a_str: READABLE_STRING_8)
-- Put `a_str' on the FastCGI stdout.
do
io.error.put_string (a_str)
end
feature -- FCGI Input
read_from_stdin (n: INTEGER)

View File

@@ -96,6 +96,15 @@ feature -- Output
"FCGI_fwrite($v, 1, $n, FCGI_stdout);"
end
feature -- Error
put_error (v: POINTER; n: INTEGER)
external
"C inline use %"fcgi_stdio.h%""
alias
"FCGI_fwrite($v, 1, $n, FCGI_stderr);"
end
feature -- Access
stdout: POINTER
@@ -114,6 +123,14 @@ feature -- Access
"FCGI_stdin"
end
stderr: POINTER
-- FCGI_stderr() return pointer on error FCGI_FILE
external
"C inline use %"fcgi_stdio.h%""
alias
"FCGI_stderr"
end
note
copyright: "Copyright (c) 1984-2011, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"

View File

@@ -77,6 +77,18 @@ feature -- FCGI output
{FCGI_C_API}.put_string (l_c_str.item, l_c_str.count)
end
feature -- Error
put_error (a_message: READABLE_STRING_8)
-- Put error message `a_message' on the FastCGI stderr
local
l_c_str: C_STRING
do
l_c_str := c_buffer
l_c_str.set_string (a_message)
fcgi.put_error (l_c_str.item, l_c_str.count)
end
feature -- FCGI Input
copy_from_stdin (n: INTEGER; tf: FILE)

View File

@@ -101,6 +101,15 @@ feature -- Output
i := fwrite (v, 1, n, stdout)
end
feature -- Error
put_error (v: POINTER; n: INTEGER)
local
i: INTEGER
do
i := fwrite (v, 1, n, stderr)
end
feature {NONE} -- Output
fwrite (v: POINTER; a_size: INTEGER; n: INTEGER; fp: POINTER): INTEGER
@@ -129,6 +138,15 @@ feature -- Access
"FCGI_stdin"
end
stderr: POINTER
-- FCGI_stderr() return pointer on error FCGI_FILE
external
"C inline use %"fcgi_stdio.h%""
alias
"FCGI_stderr"
end
note
copyright: "Copyright (c) 1984-2011, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"

View File

@@ -136,6 +136,18 @@ feature -- FCGI output
fcgi.put_string (l_c_str.item, l_c_str.count)
end
feature -- Error
put_error (a_message: READABLE_STRING_8)
-- Put error message `a_message' on the FastCGI stderr
local
l_c_str: C_STRING
do
l_c_str := c_buffer
l_c_str.set_string (a_message)
fcgi.put_error (l_c_str.item, l_c_str.count)
end
feature -- FCGI input
copy_from_stdin (n: INTEGER; f: FILE)