class HTTP_SERVER

All features

Direct parents

non-conformant parents

SERVER

Summary

creation features

exported features

Details

stand_alone (access: ACCESS, a_error_handler: PROCEDURE [O_ -> TUPLE][TUPLE 1 [A_][STRING]], a_connection_factory: FUNCTION [O_ -> TUPLE, R_][TUPLEHTTP_CONNECTION])
in_stack (access: ACCESS, a_stack: LOOP_STACK, a_shutdown_handler: PROCEDURE[TUPLE[TUPLE 1[HTTP_SERVER]]], a_error_handler: PROCEDURE [O_ -> TUPLE][TUPLE 1 [A_][STRING]], a_connection_factory: FUNCTION [O_ -> TUPLE, R_][TUPLEHTTP_CONNECTION])
is_alive: BOOLEAN
shutdown

A connection asked the server to shut down

halt

A connection asked the server to halt

connection_done (a_connection: HTTP_CONNECTION)

A connection is about to finish.

error_handler: PROCEDURE [O_ -> TUPLE][TUPLE 1 [A_][STRING]]

error handler

connection_factory: FUNCTION [O_ -> TUPLE, R_][TUPLEHTTP_CONNECTION]

the HTTP connection factory

stand_alone (access: ACCESS, a_error_handler: PROCEDURE [O_ -> TUPLE][TUPLE 1 [A_][STRING]], a_connection_factory: FUNCTION [O_ -> TUPLE, R_][TUPLEHTTP_CONNECTION])
in_stack (access: ACCESS, a_stack: LOOP_STACK, a_shutdown_handler: PROCEDURE[TUPLE[TUPLE 1[HTTP_SERVER]]], a_error_handler: PROCEDURE [O_ -> TUPLE][TUPLE 1 [A_][STRING]], a_connection_factory: FUNCTION [O_ -> TUPLE, R_][TUPLEHTTP_CONNECTION])
handle_error (msg: STRING)

What to do when there was an error

connections_pool: FAST_ARRAY [E_][WEAK_REFERENCE [G_][HTTP_CONNECTION]]
new_connection: HTTP_CONNECTION

Create a new connection

release_connection (cnx: HTTP_CONNECTION)
start (access: ACCESS)

Start a server at the given access point.

start_in_stack (access: ACCESS, a_stack: LOOP_STACK, a_shutdown_handler: PROCEDURE[TUPLE[TUPLE 1[HTTP_SERVER]]]): BOOLEAN

Start the server in the given stack. True if the server effectively started.

standalone_handler_agent: PROCEDURE[TUPLE[TUPLE 1[HTTP_SERVER]]]
common_start (access: ACCESS): BOOLEAN
deferred handle_error (error_message: STRING)

What to do when there was an error

deferred new_connection: C_

Create a new connection

stack: LOOP_STACK
server: SOCKET_SERVER_JOB
connections: INTEGER
shutdown_handler: PROCEDURE[TUPLE[TUPLE 1[HTTP_SERVER]]]
handle_connect (a_io: SOCKET_INPUT_OUTPUT_STREAM)

Handle a connection to the server. This feature is called back by the server when a connection is attempted (see the when_connect feature of SOCKET_SERVER)

handle_shutdown (a_server: SOCKET_SERVER_JOB)

Shutdown gracefully when all connections are closed. This feature is called back by the server when it is asked to shut down (see the when_shutdown feature of SOCKET_SERVER)

require

  • a_server = server
  • server.done

standalone_shutdown (a_server: HTTP_SERVER)

require

  • a_server = Current