PHP Trait PHPPM\ProcessCommunicationTrait

Afficher le fichier Open project: php-pm/php-pm

Protected Properties

Свойство Type Description
$socketPath string Path to socket folder.

Méthodes publiques

Méthode Description
processMessage ( array $data, Connection $conn ) Parses a received message. Redirects to the appropriate command* method.
setSocketPath ( string $socketPath )

Méthodes protégées

Méthode Description
bindProcessMessage ( Connection $conn ) Binds data-listener to $conn and waits for incoming commands.
getNewControllerHost ( boolean $removeOld = true ) : string
getNewSlaveSocket ( integer $port ) : string
getSockFile ( string $affix, boolean $removeOld ) : string
sendMessage ( Connection $conn, string $command, array $message = [] ) Sends a message through $conn.

Method Details

bindProcessMessage() protected méthode

Binds data-listener to $conn and waits for incoming commands.
protected bindProcessMessage ( Connection $conn )
$conn React\Socket\Connection

getNewControllerHost() protected méthode

protected getNewControllerHost ( boolean $removeOld = true ) : string
$removeOld boolean
Résultat string

getNewSlaveSocket() protected méthode

protected getNewSlaveSocket ( integer $port ) : string
$port integer
Résultat string

getSockFile() protected méthode

protected getSockFile ( string $affix, boolean $removeOld ) : string
$affix string
$removeOld boolean
Résultat string

processMessage() public méthode

Parses a received message. Redirects to the appropriate command* method.
public processMessage ( array $data, Connection $conn )
$data array
$conn React\Socket\Connection

sendMessage() protected méthode

Sends a message through $conn.
protected sendMessage ( Connection $conn, string $command, array $message = [] )
$conn React\Socket\Connection
$command string
$message array

setSocketPath() public méthode

public setSocketPath ( string $socketPath )
$socketPath string

Property Details

$socketPath protected_oe property

Path to socket folder.
protected string $socketPath
Résultat string