Daemon
abstract class Daemon extends Process (View source)
Traits
Properties
protected int | $pid | Current PID | from PidTrait |
protected | $signals | from SignalsTrait | |
protected | $pidlock | ||
protected | $socket | ||
protected | $workers | ||
protected | $console | ||
protected | $is_active | ||
protected | $is_supervisor | ||
static protected | $default_properties |
Methods
__construct($properties = [], LoggerInterface $logger = null, Manager $events = null)
Daemon constructor
getSocket()
No description
getWorkers()
No description
setup()
Setup method; it allows to inject code BEFORE the daemon spinup
init()
Parse console arguments and init the daemon
daemonize()
Start as a daemon, forking main process and detaching it from terminal
start()
Start the process, creating socket and spinning up workers (if any)
stop()
No description
declass()
No description
Details
in SignalsTrait at line 25
getSignals()
in SignalsTrait at line 31
setSignals(PosixSignals $signals)
at line 70
__construct($properties = [], LoggerInterface $logger = null, Manager $events = null)
Daemon constructor
Process
signalToEvent(int $signal)
The generic signal handler.
It transforms a signal into framework catchable event.
at line 105
getSocket()
at line 109
getWorkers()
at line 117
abstract
setup()
Setup method; it allows to inject code BEFORE the daemon spinup
at line 123
init()
Parse console arguments and init the daemon
at line 160
daemonize()
Start as a daemon, forking main process and detaching it from terminal
at line 180
start()
Start the process, creating socket and spinning up workers (if any)