deferred class SERVER [C_ -> CONNECTION]

All features

A standard server. Abstracts out most of the nitty-gritty.

Direct parents

non-conformant parents

ANY

Known children

non-conformant children

HTTP_SERVER

Summary

exported features

Details

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[SERVER [C_ -> CONNECTION]]]]): BOOLEAN

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

standalone_handler_agent: PROCEDURE[TUPLE[TUPLE 1[SERVER [C_ -> CONNECTION]]]]
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[SERVER [C_ -> CONNECTION]]]]
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: SERVER [C_ -> CONNECTION])

require

  • a_server = Current