Fixed compilation of proxy and simple examples.
Made the websocket client library scoop capable.
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
<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="console_application" value="true"/>
|
<setting name="console_application" value="true"/>
|
||||||
|
<setting name="concurrency" value="scoop"/>
|
||||||
<variable name="ssl_supported" value="false"/>
|
<variable name="ssl_supported" value="false"/>
|
||||||
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
||||||
<library name="http" location="..\..\library\network\protocol\http\http-safe.ecf"/>
|
<library name="http" location="..\..\library\network\protocol\http\http-safe.ecf"/>
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
<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="console_application" value="true"/>
|
<setting name="console_application" value="true"/>
|
||||||
|
<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="http" location="..\..\library\network\protocol\http\http-safe.ecf"/>
|
<library name="http" location="..\..\library\network\protocol\http\http-safe.ecf"/>
|
||||||
<library name="wsf" location="..\..\library\server\wsf\wsf-safe.ecf"/>
|
<library name="wsf" location="..\..\library\server\wsf\wsf-safe.ecf"/>
|
||||||
|
|||||||
@@ -29,10 +29,8 @@ feature {NONE} -- Initialization
|
|||||||
|
|
||||||
create ws_client.make_with_port ("ws://echo.websocket.org", 80, Void)
|
create ws_client.make_with_port ("ws://echo.websocket.org", 80, Void)
|
||||||
-- create ws_client.make_with_port ("ws://127.0.0.1", 9090, Void)
|
-- create ws_client.make_with_port ("ws://127.0.0.1", 9090, Void)
|
||||||
ws_client.launch
|
|
||||||
ws_client.join_all
|
|
||||||
|
|
||||||
execution_environment.sleep (5_000_000)
|
ws_client.execute
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -7,9 +7,10 @@
|
|||||||
<exclude>/CVS$</exclude>
|
<exclude>/CVS$</exclude>
|
||||||
<exclude>/EIFGENs$</exclude>
|
<exclude>/EIFGENs$</exclude>
|
||||||
</file_rule>
|
</file_rule>
|
||||||
<option warning="true" void_safety="all">
|
<option warning="true" void_safety="all">
|
||||||
<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"/>
|
||||||
<setting name="console_application" value="true"/>
|
<setting name="console_application" value="true"/>
|
||||||
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
||||||
<library name="web_socket_client" location="..\..\web_socket_client-safe.ecf" readonly="false"/>
|
<library name="web_socket_client" location="..\..\web_socket_client-safe.ecf" readonly="false"/>
|
||||||
@@ -17,7 +18,7 @@
|
|||||||
</target>
|
</target>
|
||||||
<target name="ws_client" extends="common">
|
<target name="ws_client" extends="common">
|
||||||
<root class="APPLICATION" feature="make"/>
|
<root class="APPLICATION" feature="make"/>
|
||||||
<setting name="concurrency" value="thread"/>
|
<setting name="concurrency" value="scoop"/>
|
||||||
</target>
|
</target>
|
||||||
<target name="ws_client_ssl" extends="ws_client">
|
<target name="ws_client_ssl" extends="ws_client">
|
||||||
<variable name="ssl_enabled" value="true"/>
|
<variable name="ssl_enabled" value="true"/>
|
||||||
|
|||||||
@@ -23,11 +23,6 @@ inherit
|
|||||||
|
|
||||||
WEB_SOCKET
|
WEB_SOCKET
|
||||||
|
|
||||||
THREAD
|
|
||||||
rename
|
|
||||||
make as thread_make
|
|
||||||
end
|
|
||||||
|
|
||||||
feature -- Initialization
|
feature -- Initialization
|
||||||
|
|
||||||
initialize (a_uri: READABLE_STRING_GENERAL; a_protocols: detachable ITERABLE [STRING])
|
initialize (a_uri: READABLE_STRING_GENERAL; a_protocols: detachable ITERABLE [STRING])
|
||||||
@@ -35,7 +30,6 @@ feature -- Initialization
|
|||||||
require
|
require
|
||||||
is_valid_uri: is_valid_uri (a_uri)
|
is_valid_uri: is_valid_uri (a_uri)
|
||||||
do
|
do
|
||||||
thread_make
|
|
||||||
uri := a_uri
|
uri := a_uri
|
||||||
set_default_port
|
set_default_port
|
||||||
create protocol.make_empty
|
create protocol.make_empty
|
||||||
@@ -50,7 +44,6 @@ feature -- Initialization
|
|||||||
require
|
require
|
||||||
is_valid_uri: is_valid_uri (a_uri)
|
is_valid_uri: is_valid_uri (a_uri)
|
||||||
do
|
do
|
||||||
thread_make
|
|
||||||
uri := a_uri
|
uri := a_uri
|
||||||
port := a_port
|
port := a_port
|
||||||
create protocol.make_empty
|
create protocol.make_empty
|
||||||
@@ -64,11 +57,9 @@ feature -- Initialization
|
|||||||
require
|
require
|
||||||
is_valid_uri: is_valid_uri (a_host)
|
is_valid_uri: is_valid_uri (a_host)
|
||||||
do
|
do
|
||||||
thread_make
|
|
||||||
uri := a_host + ":" + a_port.out + a_path
|
uri := a_host + ":" + a_port.out + a_path
|
||||||
port := a_port
|
port := a_port
|
||||||
create protocol.make_empty
|
create protocol.make_empty
|
||||||
-- set_protocols (a_protocols)
|
|
||||||
create ready_state.make
|
create ready_state.make
|
||||||
socket := new_socket (port, host)
|
socket := new_socket (port, host)
|
||||||
create server_handshake.make
|
create server_handshake.make
|
||||||
@@ -98,8 +89,10 @@ feature -- Access
|
|||||||
local
|
local
|
||||||
l_uri: URI
|
l_uri: URI
|
||||||
do
|
do
|
||||||
create l_uri.make_from_string (a_uri.as_string_8)
|
if a_uri.is_valid_as_string_8 then
|
||||||
Result := l_uri.is_valid
|
create l_uri.make_from_string (a_uri.to_string_8)
|
||||||
|
Result := l_uri.is_valid
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
server_handshake: WEB_SOCKET_HANDSHAKE_DATA
|
server_handshake: WEB_SOCKET_HANDSHAKE_DATA
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
<library name="lib_http_network" location="..\..\http_network\http_network-safe.ecf"/>
|
<library name="lib_http_network" location="..\..\http_network\http_network-safe.ecf"/>
|
||||||
<library name="lib_web_socket_protocol" location="..\protocol\web_socket_protocol-safe.ecf"/>
|
<library name="lib_web_socket_protocol" location="..\protocol\web_socket_protocol-safe.ecf"/>
|
||||||
<library name="net" location="$ISE_LIBRARY\library\net\net-safe.ecf"/>
|
<library name="net" location="$ISE_LIBRARY\library\net\net-safe.ecf"/>
|
||||||
<library name="thread" location="$ISE_LIBRARY\library\thread\thread-safe.ecf"/>
|
|
||||||
<library name="uri" location="$ISE_LIBRARY\library\text\uri\uri-safe.ecf"/>
|
<library name="uri" location="$ISE_LIBRARY\library\text\uri\uri-safe.ecf"/>
|
||||||
<cluster name="web_socket_client" location=".\src\" recursive="true">
|
<cluster name="web_socket_client" location=".\src\" recursive="true">
|
||||||
<file_rule>
|
<file_rule>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<exclude>/CVS$</exclude>
|
<exclude>/CVS$</exclude>
|
||||||
<exclude>/EIFGENs$</exclude>
|
<exclude>/EIFGENs$</exclude>
|
||||||
</file_rule>
|
</file_rule>
|
||||||
<option warning="true" void_safety="none">
|
<option warning="true" void_safety="none">
|
||||||
</option>
|
</option>
|
||||||
<setting name="concurrency" value="scoop"/>
|
<setting name="concurrency" value="scoop"/>
|
||||||
<library name="base" location="$ISE_LIBRARY\library\base\base.ecf"/>
|
<library name="base" location="$ISE_LIBRARY\library\base\base.ecf"/>
|
||||||
@@ -17,7 +17,6 @@
|
|||||||
<library name="lib_http_network" location="..\..\http_network\http_network.ecf"/>
|
<library name="lib_http_network" location="..\..\http_network\http_network.ecf"/>
|
||||||
<library name="lib_web_socket_protocol" location="..\protocol\web_socket_protocol.ecf"/>
|
<library name="lib_web_socket_protocol" location="..\protocol\web_socket_protocol.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="uri" location="$ISE_LIBRARY\library\text\uri\uri.ecf"/>
|
<library name="uri" location="$ISE_LIBRARY\library\text\uri\uri.ecf"/>
|
||||||
<cluster name="web_socket_client" location=".\src\" recursive="true">
|
<cluster name="web_socket_client" location=".\src\" recursive="true">
|
||||||
<file_rule>
|
<file_rule>
|
||||||
|
|||||||
Reference in New Issue
Block a user