php-amqplib

SIGHeartbeatSender extends AbstractSignalHeartbeatSender
in package

Manages pcntl-based heartbeat sending for a {@link AbstractConnection}.

Tags
see
AbstractSignalHeartbeatSender
since
3.2.0

This version of a signal based heartbeat sender allows using any signal number. It forks the current process to create a child process that periodically sends a signal to the parent process. The default signal used is SIGUSR1

Table of Contents

$connection  : AbstractConnection|null
$wasActive  : bool
$childPid  : int|null
$signal  : int
__construct()  : mixed
__destruct()  : mixed
register()  : void
Starts the heartbeats
unregister()  : void
Stops the heartbeats.
handleSignal()  : void
Handles the heartbeat when a signal interrupt is received
isSupported()  : bool
periodicAlarm()  : void
Forks the current process to create a child process that will send periodic signals to the parent
registerListener()  : void

Properties

$childPid

private int|null $childPid

the PID (process ID) of the child process sending regular signals to manage heartbeats

Methods

register()

Starts the heartbeats

public register() : void
Return values
void

unregister()

Stops the heartbeats.

public unregister() : void
Return values
void

handleSignal()

Handles the heartbeat when a signal interrupt is received

protected handleSignal(int $interval) : void
Parameters
$interval : int
Return values
void

periodicAlarm()

Forks the current process to create a child process that will send periodic signals to the parent

private periodicAlarm(int $interval) : void
Parameters
$interval : int
Return values
void

registerListener()

private registerListener(int $interval) : void
Parameters
$interval : int
Return values
void

Search results