home
wiki
classes/clusters list
class information
+
Point of view
ANY
ANY
SERVER
LOOP_ITEM
JOB
INTERNALS_HANDLER
All features
class SOCKET_SERVER_JOB
Summary
top
Encapsulate the server in a sequencer-aware job.
Direct parents
inherit list:
JOB
Overview
top
creation features
make
(a_server:
SOCKET_SERVER
)
sync_make
(a_server:
SOCKET_SERVER
)
exported features
when_connect
(handler:
PROCEDURE
[
TUPLE 1
[
SOCKET_INPUT_OUTPUT_STREAM
]])
What to do when connection happens (i.e. some client tries to connect to the server).
when_shutdown
(handler:
PROCEDURE
[
TUPLE 1
[SOCKET_SERVER_JOB]])
Should be more accurately be called
when_shutdown_or_halt
.
shutdown
Wait for the connections to finish, then stop the server.
halt
done
:
BOOLEAN
done
returns
True
when the job is finished.
when_connect
(handler:
PROCEDURE
[
TUPLE 1
[
SOCKET_INPUT_OUTPUT_STREAM
]])
effective procedure
top
What to do when connection happens (i.e. some client tries to connect to the server).
The procedure is given the stream connected to the client.
require
not
done
when_shutdown
(handler:
PROCEDURE
[
TUPLE 1
[SOCKET_SERVER_JOB]])
effective procedure
top
Should be more accurately be called
when_shutdown_or_halt
.
The agent is called when a shutdown or a halt of the server occurs.
require
not
done
shutdown
effective procedure
top
Wait for the connections to finish, then stop the server.
No more connections will be accepted.
require
not
done
halt
effective procedure
top
require
not
done
done
:
BOOLEAN
writable attribute
top
done
returns
True
when the job is finished.
Then the job may be
restart
(ed) if it need to run again.