class MULTIPLEX_SERVER
Summary
If you try to make a real server using our technology, this class may prove useful. Be sure to have seen the class SOCKETS first.
Direct parents
Insert list: SERVER
Overview
Creation features
{ANY}
Features
{}
{MULTIPLEX_CONNECTION}
Access
{ANY}
Implementation
{}
make
effective procedure
{}
new_connection: MULTIPLEX_CONNECTION
effective function
{}
Create a new connection
handle_error (error_message: STRING)
effective procedure
{}
What to do when there was an error with message a_error_message
shutdown
effective procedure
A connection asked the server to shut down
halt
effective procedure
A connection asked the server to halt
connection_done (a_connection: MULTIPLEX_CONNECTION)
effective procedure
A connection is just finished.
start (a_access: ACCESS)
effective procedure
{ANY}
Launch a Current using the given a_access point.
start_in_stack (a_access: ACCESS, a_stack: LOOP_STACK, a_shutdown_handler: PROCEDURE[TUPLE[TUPLE 1[MULTIPLEX_SERVER]]]): BOOLEAN
effective function
{ANY}
Assing a_shutdown_handler as shutdown_handler and start Current using a_access in the given a_stack.
set_logger (a_logger: PROCEDURE[TUPLE 1[ABSTRACT_STRING]])
effective procedure
{ANY}
Assign logger with the value of a_logger
log (a_message: ABSTRACT_STRING)
effective procedure
{ANY}
Write a_message in the logger, if any.
writable attribute
{}
Used to log message
standalone_handler_agent: PROCEDURE[TUPLE[TUPLE 1[MULTIPLEX_SERVER]]]
effective function
{}
An Agent to be use to launch standalone_shutdown
common_start (a_access: ACCESS): BOOLEAN
effective function
{}
Start Current using a_access.
stack: LOOP_STACK
writable attribute
{}
Used to loop between connections
server_job: SOCKET_SERVER_JOB
writable attribute
{}
A job use in Current
connections: INTEGER_32
writable attribute
{}
The number of {CONNECTION} in Current
shutdown_handler: PROCEDURE[TUPLE[TUPLE 1[MULTIPLEX_SERVER]]]
writable attribute
{}
Agent launched when Current is shutdowning
handle_connect (a_io: SOCKET_INPUT_OUTPUT_STREAM)
effective procedure
{}
Handle a connection to the Current.
handle_shutdown (a_server_job: SOCKET_SERVER_JOB)
effective procedure
{}
Shutdown gracefully when all connections are closed.
standalone_shutdown (a_server: MULTIPLEX_SERVER)
effective procedure
{}
Force Current to shutdown.