- the standalone connector support for SSL, is using certicate files for now (no in-memory support).
- to enable ssl support, set ecf variable `httpd_ssl_enabled=true`.
- added the `simple_ssl` example to demonstrate how to have standalone ssl server.
(be careful when using EiffelNet SSL and the http_client library, disable the libcurl
via ecf variable `libcurl_http_client_disabled=true` )
Added support for recv timeout to the EiffelWeb standalone connector.
- made EiffelWeb compilable with 16.05 and upcoming 16.11.
Done via ecfs condition on version to accept EiffelNet with recv_timeout (from 16.11), and without (until 16.05).
- adding recv timeout prevents server to hang for ever if a client wait too long to send data.
Updated various comments.
116 lines
2.6 KiB
Plaintext
116 lines
2.6 KiB
Plaintext
note
|
|
description: "[
|
|
Component to launch the service using the default connector
|
|
|
|
How-to:
|
|
|
|
s: WSF_SERVICE_LAUNCHER
|
|
create s.make_and_launch (service)
|
|
|
|
`service' can be Current if inherit from WSF_SERVICE
|
|
or also `create {WSF_CALLBACK_SERVICE}.make (agent execute)'
|
|
|
|
execute (req: WSF_REQUEST; res: WSF_RESPONSE)
|
|
do
|
|
-- ...
|
|
end
|
|
|
|
You can also provide specific options that might be relevant
|
|
only for specific connectors such as
|
|
|
|
|
|
For instance, you can use
|
|
create s.make_and_launch_and_options (agent execute, <<["port", 8099]>>)
|
|
|
|
And if the connector is the Standalone connector,
|
|
check {WSF_STANDALONE_SERVICE_LAUNCHER} for options description, such as:
|
|
port: numeric such as 8099 (or equivalent string as "8099")
|
|
base: base_url (very specific to standalone server)
|
|
verbose: to display verbose output.
|
|
]"
|
|
date: "$Date$"
|
|
revision: "$Revision$"
|
|
|
|
deferred class
|
|
WSF_SERVICE_LAUNCHER [G -> WSF_EXECUTION create make end]
|
|
|
|
feature {NONE} -- Initialization
|
|
|
|
frozen make (a_options: like options)
|
|
do
|
|
options := a_options
|
|
initialize
|
|
ensure
|
|
options_set: options = a_options
|
|
launchable: launchable
|
|
end
|
|
|
|
frozen make_and_launch (a_options: like options)
|
|
do
|
|
make (a_options)
|
|
launch
|
|
end
|
|
|
|
initialize
|
|
-- Initialize Current using `options' if attached
|
|
-- and build the connector
|
|
deferred
|
|
ensure
|
|
connector_attached: connector /= Void
|
|
end
|
|
|
|
feature -- Status report
|
|
|
|
launchable: BOOLEAN
|
|
-- Is default service launchable?
|
|
do
|
|
Result := connector /= Void
|
|
end
|
|
|
|
connector: detachable WGI_CONNECTOR
|
|
-- Connector associated to current default service
|
|
deferred
|
|
end
|
|
|
|
connector_name: READABLE_STRING_8
|
|
-- Connector's name associated to current default service
|
|
do
|
|
if attached connector as conn then
|
|
Result := conn.name
|
|
else
|
|
check
|
|
connector_attached: False
|
|
end
|
|
Result := ""
|
|
end
|
|
end
|
|
|
|
feature -- Execution
|
|
|
|
launch
|
|
-- Launch default service
|
|
require
|
|
launchable: launchable
|
|
deferred
|
|
end
|
|
|
|
feature {NONE} -- Implementation
|
|
|
|
options: detachable WSF_SERVICE_LAUNCHER_OPTIONS
|
|
-- Custom options which might be support (or not) by the default service
|
|
|
|
invariant
|
|
connector_attached: connector /= Void
|
|
|
|
note
|
|
copyright: "2011-2015, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Colin Adams, Eiffel Software and others"
|
|
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
|
source: "[
|
|
Eiffel Software
|
|
5949 Hollister Ave., Goleta, CA 93117 USA
|
|
Telephone 805-685-1006, Fax 805-685-6869
|
|
Website http://www.eiffel.com
|
|
Customer support http://support.eiffel.com
|
|
]"
|
|
end
|