From fffa763d057aeb47c5d77ceccd52e4cbfcddd818 Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Wed, 6 May 2015 22:37:55 +0200 Subject: [PATCH] Updated a few comments. --- .../concurrency/scoop/httpd_connection_handler.e | 9 ++++----- .../httpd/configuration/httpd_configuration_i.e | 15 +++++++-------- .../src/httpd/httpd_connection_handler_i.e | 2 +- .../src/httpd/httpd_request_handler_i.e | 5 ++--- .../standalone/src/httpd/httpd_server_i.e | 10 +++++----- library/server/wsf/src/wsf_execution.e | 7 +++---- 6 files changed, 22 insertions(+), 26 deletions(-) diff --git a/library/server/ewsgi/connectors/standalone/src/httpd/concurrency/scoop/httpd_connection_handler.e b/library/server/ewsgi/connectors/standalone/src/httpd/concurrency/scoop/httpd_connection_handler.e index 757d46bd..9a5f4664 100644 --- a/library/server/ewsgi/connectors/standalone/src/httpd/concurrency/scoop/httpd_connection_handler.e +++ b/library/server/ewsgi/connectors/standalone/src/httpd/concurrency/scoop/httpd_connection_handler.e @@ -31,8 +31,7 @@ feature {NONE} -- Initialization end initialize_pool (p: like pool; n: INTEGER) - -- Initialize pool of separate connection handlers. - --| set the pool capacity to n. + -- Initialize Concurrent pool of `n' potential separate connection handlers. do p.set_count (n) end @@ -60,7 +59,7 @@ feature {HTTPD_SERVER_I} -- Execution end pool_gracefull_stop (p: like pool) - -- Graceful stop pool of separate connection handlers. + -- Graceful stop concurrent pool of separate connection handlers. do p.gracefull_stop end @@ -97,7 +96,7 @@ feature {HTTPD_SERVER_I} -- Execution end process_handler (hdl: separate HTTPD_REQUEST_HANDLER) - -- Process request handler `hdl' concurrently. + -- Process request handler `hdl' as soon as `hdl' is connected to accepted socket. require hdl.is_connected do @@ -123,7 +122,7 @@ feature {HTTPD_SERVER_I} -- Status report feature {NONE} -- Implementation separate_client_socket (hdl: separate HTTPD_REQUEST_HANDLER): separate HTTPD_STREAM_SOCKET - -- Client socket for handler `hdl'. + -- Client socket for request handler `hdl'. do Result := hdl.client_socket end diff --git a/library/server/ewsgi/connectors/standalone/src/httpd/configuration/httpd_configuration_i.e b/library/server/ewsgi/connectors/standalone/src/httpd/configuration/httpd_configuration_i.e index 6046dc2e..93492678 100644 --- a/library/server/ewsgi/connectors/standalone/src/httpd/configuration/httpd_configuration_i.e +++ b/library/server/ewsgi/connectors/standalone/src/httpd/configuration/httpd_configuration_i.e @@ -63,7 +63,7 @@ feature -- Access: SSL -- private key to the certificate. ssl_protocol: NATURAL - -- By default protocol is tls 1.2. + -- By default protocol is tls 1.2. feature -- Element change @@ -71,7 +71,6 @@ feature -- Element change do if v = Void then unset_http_server_name --- http_server_name := Void else create {IMMUTABLE_STRING_8} http_server_name.make_from_separate (v) end @@ -79,6 +78,7 @@ feature -- Element change end unset_http_server_name + -- Unset `http_server_name' value. do http_server_name := Void ensure @@ -162,12 +162,11 @@ feature -- Element change else is_secure := False end - --| Missing postcondition - --| ensure - -- is_secure_set : has_ssl_support implies is_secure - -- http_server_port_set: has_ssl_support implies http_server_port = 443 - -- is_not_secure: not has_ssl_support implies not is_secure - -- default_port: not has_ssl_support implies http_server_port = 80 + ensure + is_secure_set: has_ssl_support implies is_secure + -- http_server_port_set: has_ssl_support implies http_server_port = 443 + is_not_secure: not has_ssl_support implies not is_secure + -- default_port: not has_ssl_support implies http_server_port = 80 end feature -- Element change diff --git a/library/server/ewsgi/connectors/standalone/src/httpd/httpd_connection_handler_i.e b/library/server/ewsgi/connectors/standalone/src/httpd/httpd_connection_handler_i.e index fa89d1fa..be3e51f3 100644 --- a/library/server/ewsgi/connectors/standalone/src/httpd/httpd_connection_handler_i.e +++ b/library/server/ewsgi/connectors/standalone/src/httpd/httpd_connection_handler_i.e @@ -79,7 +79,7 @@ feature {NONE} -- Implementation end separate_server_log (a_server: like server; a_message: separate READABLE_STRING_8) - -- Separete log from a server `a_server' with message `a_message'. + -- Concurrent call to `a_server.log (a_message)'. do a_server.log (a_message) end diff --git a/library/server/ewsgi/connectors/standalone/src/httpd/httpd_request_handler_i.e b/library/server/ewsgi/connectors/standalone/src/httpd/httpd_request_handler_i.e index de42e66f..b394d6d5 100644 --- a/library/server/ewsgi/connectors/standalone/src/httpd/httpd_request_handler_i.e +++ b/library/server/ewsgi/connectors/standalone/src/httpd/httpd_request_handler_i.e @@ -1,5 +1,5 @@ note - description: "Represent a handler interface that process HTTP requests." + description: "HTTPD handler interface processing request." date: "$Date$" revision: "$Revision$" @@ -126,7 +126,7 @@ feature -- Change feature -- Execution safe_execute - -- Execute incoming request. + -- Execute accepted incoming connection as request. local retried: BOOLEAN do @@ -219,7 +219,6 @@ feature -- Execution if has_error then -- check catch_bad_incoming_connection: False end if is_verbose then --- check invalid_incoming_request: False end log ("ERROR: invalid HTTP incoming request") end else diff --git a/library/server/ewsgi/connectors/standalone/src/httpd/httpd_server_i.e b/library/server/ewsgi/connectors/standalone/src/httpd/httpd_server_i.e index 39a7c894..b4115f1c 100644 --- a/library/server/ewsgi/connectors/standalone/src/httpd/httpd_server_i.e +++ b/library/server/ewsgi/connectors/standalone/src/httpd/httpd_server_i.e @@ -14,9 +14,10 @@ inherit feature {NONE} -- Initialization make (a_factory: like factory) + -- Create current httpd server with `a_factory' of connection handlers. -- `a_factory': connection handler builder require - fac_is_separated: {PLATFORM}.is_scoop_capable implies not attached {HTTPD_REQUEST_HANDLER_FACTORY} a_factory + a_factory_is_separated: {PLATFORM}.is_scoop_capable implies not attached {HTTPD_REQUEST_HANDLER_FACTORY} a_factory do make_configured (create {like configuration}.make, a_factory) end @@ -66,7 +67,7 @@ feature -- Callbacks observer: detachable separate HTTPD_SERVER_OBSERVER set_observer (obs: like observer) - -- Set `observer' with `obs' + -- Set `observer' to `obs'. do observer := obs end @@ -252,7 +253,6 @@ feature -- Event require not_launched: not is_launched do --- print ("port=" + a_port.out + "%N") is_launched := True port := a_port if attached observer as obs then @@ -320,7 +320,7 @@ feature -- Output output: detachable FILE set_log_output (f: FILE) - -- Set `output' with `f'. + -- Set `output' to `f'. do output := f ensure @@ -328,7 +328,7 @@ feature -- Output end log (a_message: separate READABLE_STRING_8) - -- Log `a_message' + -- Log `a_message'. local m: STRING do diff --git a/library/server/wsf/src/wsf_execution.e b/library/server/wsf/src/wsf_execution.e index 36d5d7d4..0f0ddb5f 100644 --- a/library/server/wsf/src/wsf_execution.e +++ b/library/server/wsf/src/wsf_execution.e @@ -1,5 +1,5 @@ note - description: "Object that represent a request execution with request and response. " + description: "Request execution based on attributes `request' and `response'. " date: "$Date$" revision: "$Revision$" @@ -51,7 +51,7 @@ feature -- Access feature -- Execution execute - -- Execute Current `request', + -- Execute Current request, -- getting data from `request' -- and response to client via `response'. deferred @@ -90,14 +90,13 @@ feature -- Helpers end put_error (err: READABLE_STRING_8) - -- Report error described by `a_message'. + -- Report error message `err' on the error output of the associated connector. require message_writable: message_writable do response.put_error (err) end - feature -- Cleaning clean