Updated deprecated EiffelWeb nino to make it compilable with upcoming EiffelStudio 16.11.

Updated various projects to make them up-to-date and compilable with this latest EiffelWeb.
This commit is contained in:
2016-10-10 21:40:15 +02:00
parent aed7461faf
commit 7a546622bc
9 changed files with 70 additions and 70 deletions

View File

@@ -17,10 +17,21 @@ create
make_server_by_port make_server_by_port
create {NETWORK_STREAM_SOCKET} create {NETWORK_STREAM_SOCKET}
make_from_descriptor_and_address make_from_descriptor_and_address,
make_empty
feature {NONE} -- Initialization feature {NONE} -- Initialization
make_server_by_address_and_port (a_address: INET_ADDRESS; a_port: INTEGER)
-- Create server socket on `a_address' and `a_port'.
require
valid_port: a_port >= 0
do
make
create address.make_from_address_and_port (a_address, a_port)
bind
end
make make
-- Create a network stream socket. -- Create a network stream socket.
do do
@@ -28,16 +39,6 @@ feature {NONE} -- Initialization
set_reuse_address set_reuse_address
end end
make_server_by_address_and_port (an_address: INET_ADDRESS; a_port: INTEGER)
-- Create server socket on `an_address' and `a_port'.
require
valid_port: a_port >= 0
do
make
create address.make_from_address_and_port (an_address, a_port)
bind
end
feature -- Basic operation feature -- Basic operation
send_message (a_msg: STRING) send_message (a_msg: STRING)

View File

@@ -29,16 +29,6 @@ feature {NONE} -- Initialization
set_reuse_address set_reuse_address
end end
make_server_by_address_and_port (an_address: INET_ADDRESS; a_port: INTEGER)
-- Create server socket on `an_address' and `a_port'.
require
valid_port: a_port >= 0
do
make
create address.make_from_address_and_port (an_address, a_port)
bind
end
feature -- Basic operation feature -- Basic operation
send_message (a_msg: STRING) send_message (a_msg: STRING)

View File

@@ -22,13 +22,13 @@
<file_rule> <file_rule>
<exclude>tcp_stream_socket.e</exclude> <exclude>tcp_stream_socket.e</exclude>
<condition> <condition>
<version type="compiler" max="15.01.9.6506"/> <version type="compiler" max="16.11"/>
</condition> </condition>
</file_rule> </file_rule>
</cluster> </cluster>
<cluster name="spec_before_15_01" location=".\library\spec\before_15_01\" recursive="true"> <cluster name="spec_until_16_05" location=".\library\spec\until_16_05\" recursive="true">
<condition> <condition>
<version type="compiler" max="15.01.9.6506"/> <version type="compiler" max="16.11"/>
</condition> </condition>
</cluster> </cluster>
</target> </target>

View File

@@ -1,35 +1,35 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-8-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-8-0 http://www.eiffel.com/developers/xml/configuration-1-8-0.xsd" name="nino" uuid="32C1D67D-33DE-4F1E-864B-D45388F2E3E6" library_target="nino"> <system xmlns="http://www.eiffel.com/developers/xml/configuration-1-8-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-8-0 http://www.eiffel.com/developers/xml/configuration-1-8-0.xsd" name="nino" uuid="32C1D67D-33DE-4F1E-864B-D45388F2E3E6" library_target="nino">
<target name="nino"> <target name="nino">
<root all_classes="true"/> <root all_classes="true"/>
<file_rule> <file_rule>
<exclude>/.git$</exclude> <exclude>/.git$</exclude>
<exclude>/EIFGENs$</exclude> <exclude>/EIFGENs$</exclude>
<exclude>/CVS$</exclude> <exclude>/CVS$</exclude>
<exclude>/.svn$</exclude> <exclude>/.svn$</exclude>
</file_rule> </file_rule>
<option warning="true" void_safety="none"> <option warning="true" void_safety="none">
<assertions precondition="true" postcondition="true" check="true" invariant="true" loop="true" supplier_precondition="true"/> <assertions precondition="true" postcondition="true" check="true" invariant="true" loop="true" supplier_precondition="true"/>
</option> </option>
<setting name="concurrency" value="thread"/> <setting name="concurrency" value="thread"/>
<library name="base" location="$ISE_LIBRARY\library\base\base.ecf"/> <library name="base" location="$ISE_LIBRARY\library\base\base.ecf"/>
<library name="net" location="$ISE_LIBRARY\library\net\net.ecf"/> <library name="net" location="$ISE_LIBRARY\library\net\net.ecf"/>
<library name="thread" location="$ISE_LIBRARY\library\thread\thread.ecf"/> <library name="thread" location="$ISE_LIBRARY\library\thread\thread.ecf"/>
<cluster name="nino" location=".\library\" recursive="true"> <cluster name="nino" location=".\library\" recursive="true">
<file_rule> <file_rule>
<exclude>spec</exclude> <exclude>spec</exclude>
</file_rule> </file_rule>
<file_rule> <file_rule>
<exclude>tcp_stream_socket.e</exclude> <exclude>tcp_stream_socket.e</exclude>
<condition> <condition>
<version type="compiler" max="15.01.9.6506"/> <version type="compiler" max="16.11"/>
</condition> </condition>
</file_rule> </file_rule>
</cluster> </cluster>
<cluster name="spec_before_15_01" location=".\library\spec\before_15_01\" recursive="true"> <cluster name="spec_until_16_05" location=".\library\spec\until_16_05\" recursive="true">
<condition> <condition>
<version type="compiler" max="15.01.9.6506"/> <version type="compiler" max="16.11"/>
</condition> </condition>
</cluster> </cluster>
</target> </target>
</system> </system>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-16-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-16-0 http://www.eiffel.com/developers/xml/configuration-1-16-0.xsd" name="demo" uuid="DC4D6549-D5F4-4E1A-959A-6BD536737A21" library_target="demo"> <system xmlns="http://www.eiffel.com/developers/xml/configuration-1-15-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-15-0 http://www.eiffel.com/developers/xml/configuration-1-15-0.xsd" name="demo" uuid="DC4D6549-D5F4-4E1A-959A-6BD536737A21" library_target="demo">
<target name="demo"> <target name="demo">
<root class="APPLICATION" feature="make_and_launch"/> <root class="APPLICATION" feature="make_and_launch"/>
<file_rule> <file_rule>
@@ -7,9 +7,10 @@
<exclude>/CVS$</exclude> <exclude>/CVS$</exclude>
<exclude>/EIFGENs$</exclude> <exclude>/EIFGENs$</exclude>
</file_rule> </file_rule>
<option concurrency="scoop" root_catcall_detection="none" root_concurrency="scoop" root_void_safety="all" warning="true" full_class_checking="false" is_attached_by_default="true" is_obsolete_routine_type="true" void_safety="all" syntax="transitional"> <option warning="true" full_class_checking="false" is_attached_by_default="true" is_obsolete_routine_type="true" void_safety="all" syntax="transitional">
<assertions precondition="true" postcondition="true" check="true" invariant="true" loop="true" supplier_precondition="true"/> <assertions precondition="true" postcondition="true" check="true" invariant="true" loop="true" supplier_precondition="true"/>
</option> </option>
<setting name="concurrency" value="scoop"/>
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/> <library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
<library name="ewsgi" location="..\..\..\..\server\ewsgi\ewsgi-safe.ecf" readonly="false"/> <library name="ewsgi" location="..\..\..\..\server\ewsgi\ewsgi-safe.ecf" readonly="false"/>
<library name="ewsgi_standalone_connector" location="..\..\..\..\server\ewsgi\connectors\standalone\standalone-safe.ecf" readonly="false"/> <library name="ewsgi_standalone_connector" location="..\..\..\..\server\ewsgi\connectors\standalone\standalone-safe.ecf" readonly="false"/>
@@ -20,6 +21,6 @@
<cluster name="src" location=".\" recursive="true"/> <cluster name="src" location=".\" recursive="true"/>
</target> </target>
<target name="demo_mt" extends="demo"> <target name="demo_mt" extends="demo">
<option concurrency="thread" /> <setting name="concurrency" value="thread"/>
</target> </target>
</system> </system>

View File

@@ -38,7 +38,7 @@ feature {NONE} -- Initialization
make_with_base (a_base: detachable separate READABLE_STRING_8) make_with_base (a_base: detachable separate READABLE_STRING_8)
-- Create current standalone connector with base url `a_base' -- Create current standalone connector with base url `a_base'
require require
a_base_starts_with_slash: a_base /= Void implies is_valid_base (a_base) a_base_starts_with_slash: (a_base /= Void and then not a_base.is_empty) implies is_valid_base (a_base)
do do
make make
set_base (a_base) set_base (a_base)
@@ -181,6 +181,13 @@ feature -- Element change
feature -- Server feature -- Server
launch_on_port (a_port_number: INTEGER)
-- Launch server listening on port `a_port_number'.
do
set_port_number (a_port_number)
launch
end
launch launch
-- Launch web server listening. -- Launch web server listening.
do do

View File

@@ -15,13 +15,13 @@ feature {NONE} -- Initialization
make make
do do
print ("Example: start a Standalone web server on port " + port_number.out + ", %Nand reply Hello World for any request such as http://localhost:8123/%N") print ("Example: start a Standalone web server on port " + port_number.out + ", %Nand reply Hello World for any request such as http://localhost:8123/%N")
(create {STANDALONE_SERVICE [HELLO_WORLD_EXECUTION]}.make_custom ("")).listen (port_number) (create {WGI_STANDALONE_CONNECTOR [HELLO_WORLD_EXECUTION]}.make_with_base ("")).launch_on_port (port_number)
end end
port_number: INTEGER = 8123 port_number: INTEGER = 8123
note note
copyright: "2011-2015, Eiffel Software and others" copyright: "2011-2016, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[ source: "[
Eiffel Software Eiffel Software

View File

@@ -18,12 +18,12 @@ feature {NONE} -- Initialization
execute execute
do do
response.set_status_code (200, Void) response.set_status_code (200, Void)
response.put_header_text ("Content-Type: text/plain%R%N") response.put_header_text ("Content-Length: 13%R%NContent-Type: text/plain%R%N")
response.put_string ("Hello World!%N") response.put_string ("Hello World!%N")
end end
note note
copyright: "2011-2015, Eiffel Software and others" copyright: "2011-2016, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[ source: "[
Eiffel Software Eiffel Software

View File

@@ -11,15 +11,16 @@
</option> </option>
<setting name="concurrency" value="thread"/> <setting name="concurrency" value="thread"/>
<library name="base" location="$ISE_LIBRARY\library\base\base.ecf"/> <library name="base" location="$ISE_LIBRARY\library\base\base.ecf"/>
<library name="connector_nino" location="..\..\ewsgi\connectors\nino\nino.ecf" readonly="false"/>
<library name="connector_null" location="..\..\ewsgi\connectors\null\null.ecf" readonly="false"/> <library name="connector_null" location="..\..\ewsgi\connectors\null\null.ecf" readonly="false"/>
<library name="dft_nino" location="..\default\nino.ecf"/> <library name="connector_standalone" location="..\..\ewsgi\connectors\standalone\standalone.ecf" readonly="false"/>
<library name="dft_standalone" location="..\default\standalone.ecf"/>
<library name="ewsgi" location="..\..\ewsgi\ewsgi.ecf" readonly="false"/> <library name="ewsgi" location="..\..\ewsgi\ewsgi.ecf" readonly="false"/>
<library name="http" location="..\..\..\network\protocol\http\http.ecf" readonly="false"/> <library name="http" location="..\..\..\network\protocol\http\http.ecf" readonly="false"/>
<library name="http_client" location="..\..\..\network\http_client\http_client.ecf" readonly="false"/> <library name="http_client" location="..\..\..\network\http_client\net_http_client.ecf" readonly="false"/>
<library name="thread" location="$ISE_LIBRARY\library\thread\thread.ecf"/> <library name="thread" location="$ISE_LIBRARY\library\thread\thread.ecf"/>
<library name="time" location="$ISE_LIBRARY\library\time\time-safe.ecf"/> <library name="time" location="$ISE_LIBRARY\library\time\time-safe.ecf"/>
<library name="wsf" location="..\wsf.ecf" readonly="false"/> <library name="wsf" location="..\wsf.ecf" readonly="false"/>
<library name="wsf_standalone" location="..\..\wsf\connector\standalone.ecf" readonly="false"/>
<cluster name="server" location=".\server\" recursive="true"/> <cluster name="server" location=".\server\" recursive="true"/>
</target> </target>
<target name="wsf_tests" extends="server"> <target name="wsf_tests" extends="server">