PHP Трейт PHPPM\ProcessCommunicationTrait

Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$socketPath string Path to socket folder.

Открытые методы

Метод Описание
processMessage ( array $data, Connection $conn ) Parses a received message. Redirects to the appropriate command* method.
setSocketPath ( string $socketPath )

Защищенные методы

Метод Описание
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.

Описание методов

bindProcessMessage() защищенный Метод

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

getNewControllerHost() защищенный Метод

protected getNewControllerHost ( boolean $removeOld = true ) : string
$removeOld boolean
Результат string

getNewSlaveSocket() защищенный Метод

protected getNewSlaveSocket ( integer $port ) : string
$port integer
Результат string

getSockFile() защищенный Метод

protected getSockFile ( string $affix, boolean $removeOld ) : string
$affix string
$removeOld boolean
Результат string

processMessage() публичный Метод

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

sendMessage() защищенный Метод

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

setSocketPath() публичный Метод

public setSocketPath ( string $socketPath )
$socketPath string

Описание свойств

$socketPath защищенное свойство

Path to socket folder.
protected string $socketPath
Результат string