Fixed compilation of proxy and simple examples.

Made the websocket client library scoop capable.
This commit is contained in:
2016-12-05 15:56:46 +01:00
parent 186e5514eb
commit f56aa22c29
7 changed files with 11 additions and 19 deletions

View File

@@ -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://127.0.0.1", 9090, Void)
ws_client.launch
ws_client.join_all
execution_environment.sleep (5_000_000)
ws_client.execute
end
end

View File

@@ -7,9 +7,10 @@
<exclude>/CVS$</exclude>
<exclude>/EIFGENs$</exclude>
</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"/>
</option>
<setting name="concurrency" value="scoop"/>
<setting name="console_application" value="true"/>
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
<library name="web_socket_client" location="..\..\web_socket_client-safe.ecf" readonly="false"/>
@@ -17,7 +18,7 @@
</target>
<target name="ws_client" extends="common">
<root class="APPLICATION" feature="make"/>
<setting name="concurrency" value="thread"/>
<setting name="concurrency" value="scoop"/>
</target>
<target name="ws_client_ssl" extends="ws_client">
<variable name="ssl_enabled" value="true"/>

View File

@@ -23,11 +23,6 @@ inherit
WEB_SOCKET
THREAD
rename
make as thread_make
end
feature -- Initialization
initialize (a_uri: READABLE_STRING_GENERAL; a_protocols: detachable ITERABLE [STRING])
@@ -35,7 +30,6 @@ feature -- Initialization
require
is_valid_uri: is_valid_uri (a_uri)
do
thread_make
uri := a_uri
set_default_port
create protocol.make_empty
@@ -50,7 +44,6 @@ feature -- Initialization
require
is_valid_uri: is_valid_uri (a_uri)
do
thread_make
uri := a_uri
port := a_port
create protocol.make_empty
@@ -64,11 +57,9 @@ feature -- Initialization
require
is_valid_uri: is_valid_uri (a_host)
do
thread_make
uri := a_host + ":" + a_port.out + a_path
port := a_port
create protocol.make_empty
-- set_protocols (a_protocols)
create ready_state.make
socket := new_socket (port, host)
create server_handshake.make
@@ -98,8 +89,10 @@ feature -- Access
local
l_uri: URI
do
create l_uri.make_from_string (a_uri.as_string_8)
Result := l_uri.is_valid
if a_uri.is_valid_as_string_8 then
create l_uri.make_from_string (a_uri.to_string_8)
Result := l_uri.is_valid
end
end
server_handshake: WEB_SOCKET_HANDSHAKE_DATA

View File

@@ -17,7 +17,6 @@
<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="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"/>
<cluster name="web_socket_client" location=".\src\" recursive="true">
<file_rule>

View File

@@ -8,7 +8,7 @@
<exclude>/CVS$</exclude>
<exclude>/EIFGENs$</exclude>
</file_rule>
<option warning="true" void_safety="none">
<option warning="true" void_safety="none">
</option>
<setting name="concurrency" value="scoop"/>
<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_web_socket_protocol" location="..\protocol\web_socket_protocol.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"/>
<cluster name="web_socket_client" location=".\src\" recursive="true">
<file_rule>