Removed initial Thread for the HTTP_HANDLER, this is not needed here

Removed HTTP_SERVER_SHARED_CONFIGURATION from the library ... not needed by the library.
Added HTTP_SERVER_SHARED_CONFIGURATION  to the example to show how to share the configuration, if needed
This commit is contained in:
Jocelyn Fiat
2011-11-30 19:05:16 +01:00
parent 713978d70f
commit 89cd5a3b44
4 changed files with 30 additions and 23 deletions

View File

@@ -9,6 +9,8 @@ class
inherit
ARGUMENTS
HTTP_SERVER_SHARED_CONFIGURATION
create
make
@@ -24,6 +26,7 @@ feature {NONE} -- Initialization
create l_cfg.make
l_cfg.http_server_port := 9_000
l_cfg.document_root := default_document_root
set_server_configuration (l_cfg)
debug ("nino")
l_cfg.set_is_verbose (True)
end

View File

@@ -0,0 +1,48 @@
note
description: "Summary description for {HTTP_SERVER_SHARED_CONFIGURATION}."
author: ""
date: "$Date$"
revision: "$Revision$"
class
HTTP_SERVER_SHARED_CONFIGURATION
feature -- Access
server_configuration: detachable HTTP_SERVER_CONFIGURATION
-- Shared configuration
do
if attached server_configuration_cell.item as l_cfg then
Result := l_cfg
end
end
document_root: STRING_8
-- Shared document root
do
if attached server_configuration as l_cfg then
Result := l_cfg.document_root
else
Result := ""
end
end
feature -- Element change
set_server_configuration (a_cfg: like server_configuration)
-- Set `server_configuration' to `a_cfg'.
do
server_configuration_cell.replace (a_cfg)
end
feature {NONE} -- Implementation
server_configuration_cell: CELL [detachable HTTP_SERVER_CONFIGURATION]
once ("PROCESS")
create Result.put (Void)
end
note
copyright: "2011-2011, Javier Velilla and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
end