Design change, now we have req' REQUEST and res' RESPONSE instead of just `ctx'

This commit is contained in:
Jocelyn Fiat
2011-07-13 16:13:25 +02:00
parent 4e2f0dbc72
commit ac97d6019b
8 changed files with 112 additions and 32 deletions

View File

@@ -15,10 +15,10 @@ feature {NONE} -- Initialization
make
do
print ("Example: start a Nino web server on port " + port_number.out + ", %Nand reply Hello World for any request such as http://localhost:8123/%N")
(create {GW_NINO_APPLICATION}.make (agent (ctx: GW_REQUEST_CONTEXT)
(create {GW_NINO_APPLICATION}.make (agent (req: GW_REQUEST_CONTEXT; res: GW_RESPONSE)
do
ctx.output.put_header (200, <<["Content-Type", "text/plain"]>>)
ctx.output.put_string ("Hello World!%N")
res.output.put_header (200, <<["Content-Type", "text/plain"]>>)
res.output.put_string ("Hello World!%N")
end
)).listen (port_number)
end